0

While running my command of docker compose which is

docker-compose up -d

I got an error which is follow

Starting angular4_db_1 Starting angular4_db_1 error
ERROR: for angular4_db_1 Cannot start service driver failed programming external connectivity on endpoint angular4_db_1 (e89b96dca7b68ca5f0c66e02338a3e7da5ba2c84ea268eb76d6ad56f7347caf2): Bind for 0.0.0.0:5432 failed: port is already allocated ERROR: for Cannot start service driver failed programming external connectivity on endpoint angular4_db_1 (e89b96dca7b68ca5f0c66e02338a3e7da5ba2c84ea268eb76d6ad56f7347caf2): Bind for 0.0.0.0:5432 failed: port is already allocated ERROR: Encountered errors while bringing up the project.

Please help me to solve the question>.

Muhammad Numan
  • 237
  • 4
  • 20

3 Answers3

1

As the error says port is already in use, you can stop the process running on the port 5432 which will resolve this issue. I dont know which system you are using but On ubuntu this is how I kill process on the port : How to kill a process on a port on ubuntu

If this doesnt work then see if there is any container running on the same port using "docker ps" command and stop that container if not needed.

0

This error happened to me and its was because of I had port 5432 allocated to another docker container, so be checking all of your container ports you may solve it. there might be other causes to produce this error.

Farhang Amaji
  • 742
  • 11
  • 24
-1

By simply updating the system I easily solve the problem of angular db. Then upgrade the docker I easily solve it . Again install the npm by using command.

npm install

I got restoring error in node modules .

Then I check my (OS Build of Microsoft Windows) https://i.stack.imgur.com/nZ6FI.png

It must be more than (13000).

Otherwise it will not be solve. Then your error solve.

Muhammad Numan
  • 237
  • 4
  • 20