1

I'm initializing my studies with docker. When I creating the postgreSQL container with Docker, appear this error:

enter image description here

I've already reinstall docker and tried change the database port, but must be don't have success

1
  • The error says that port 5432 is already in use. Did you try using another port? Commented Mar 14, 2021 at 14:16

1 Answer 1

1

The error indicates that the 5432 port is already in use, in the HOST. This means that this port is occupied by another application. This could be for example a Postgres instance that you have on your machine or maybe another container using up this port.

The port option is -p hostPort:ContainerPort, so to have access to the Postgres port of the container which is 5432 in the host at port 5000 try:

-p 5000:5432
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.