Docker - Bind for 0.0.0.0:4000 failed: port is already allocated -
i using docker first time , trying implement - https://docs.docker.com/get-started/part2/#tag-the-image
at 1 stage trying connect localhost command -
$ curl http://localhost:4000
which showed error-
curl: (7) failed connect localhost port 4000: connection refused
however, have solved following code -
$ docker-machine ip default $ curl http://192.168.99.100:4000
after going fine, in last part, trying run app using following line according tutorial...
$ docker run -p 4000:80 anibar/get-started:part1
but, got error
c:\program files\docker toolbox\docker.exe: error response daemon: driver failed programming external connectivity on endpoint goofy_bohr (63f5691ef18ad6d6389ef52c56198389c7a627e5fa4a79133d6bbf13953a7c98): bind 0.0.0.0:4000 failed: port allocated.
it seems port allocated, can please me informing how can solve this.. lot :)
you need make sure previous container launched killed, before launching new 1 uses same port.
docker image ls docker rm -f <container-name>
Comments
Post a Comment