Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

445
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda