Tag Archives: Bind for 0.0.0.0:80 failed: port is already allocated.

[Solved] Bind for 0.0.0.0:80 failed: port is already allocated

0.0.0.0:443 failed: port is already allocated

Bind for 0.0.0.0:80 failed: port is already allocated.

In a word, the port occupied by the container has not been fully released

Check the process and find that the related container is not running, but the docker proxy is still bound to the port

ps -aux | grep -v grep | grep docker-proxy

Stop the docker process, delete all containers, delete the local-kv.db file, and then start the docker

$ sudo service docker stop
$ docker rm $(docker ps -aq)
$ sudo rm /var/lib/docker/network/files/local-kv.db
$ sudo service docker start