Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:5000: bind: address already in use [duplicate]

Tags:

docker

port

I am new and trying out this tutorial from DigitalOcean but when I do docker run -p 5000:5000 flask_demo:v0, I am getting the following error.

docker:

Error response from daemon: Ports are not available: listen tcp 0.0.0.0:5000: bind: address already in use.

Please help me

like image 752
John Cult Avatar asked Sep 02 '25 16:09

John Cult


1 Answers

Then you just bind another port

docker run -p 5001:5000 flask_demo:v0

-p 5001:5000 basically means, bind port 5001 in my host machine with the port 5000 in the container. Since port 5000 already used in your host machine, then u can bind with another port example: port 5001

like image 62
ken Avatar answered Sep 04 '25 10:09

ken