Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

444
Vistas
docker postgres failed to start with specified port

I'm new to docker and I'm trying to run a postgres database docker 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'm trying to run it without the -p option, it seems to work fine, but I can't reach it from my local pg-admin, I thought I need to add the port link to reach it.

Anyway, the container always crash after few seconds and when i'm trying to start it with the start command I'm getting the following return :

docker start -a rva-db
FATAL:  invalid value for parameter "port": "5432:5432"

What did I miss ?

FYI, I'm running it on a MacOS with the following docker version :

$ 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
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Run the container typing -p option before the image name

docker run --name rva-db  -e POSTGRES_PASSWORD=rva -e POSTGRES_DB=rva-db -d -p 5432:5432 postgres

As for Docker run reference docker run has this format

docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

Options must be before image name. After that you can set entrypoint or command (when theyy differ from default from Dockerfile) and their arguments.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda