I am new to docker and I am trying to start the docker of the postgres database with the following command:
docker run --name rva-db -e POSTGRES_PASSWORD=rva -e POSTGRES_DB=rva-db -d postgres -p 5432:5432
If I try to run it without the -p option, it seems to be working fine, but I cannot reach it from my local pg-admin, I thought I needed to add a port link in order to achieve this.
In any case, the container always crashes after a few seconds, and when I try to start it with the start command, I get the following return:
docker start -a rva-db FATAL: invalid value for parameter "port": "5432:5432"
What did I miss?
FYI, I run it on MacOS with the following version of docker:
$ docker version Client: Version: 1.12.1 API version: 1.24 Go version: go1.7.1 Git commit: 6f9534c Built: Thu Sep 8 10:31:18 2016 OS/Arch: darwin/amd64 Server: Version: 1.12.1 API version: 1.24 Go version: go1.6.3 Git commit: 23cf638 Built: Thu Aug 18 17:52:38 2016 OS/Arch: linux/amd64
source share