Docker 错误 “port is already allocated” 解决方法
Docker 在启动容器时,报出了下面的错误:docker: Error response from daemon: driver failed programming external connectivity on endpoint gateway_cc39fe5306c1 (cc39fe5306c1ba7633fa14b9bcddb66536153619bf57b84b30673e232..
Docker 在启动容器时,报出了下面的错误:
docker: Error response from daemon: driver failed programming external connectivity on endpoint gateway_cc39fe5306c1 (cc39fe5306c1ba7633fa14b9bcddb66536153619bf57b84b30673e2328e9284g): Bind for 0.0.0.0:80 failed: port is already allocated.
查看进程,发现相关的容器并没有在运行,而 docker-proxy 却依然绑定着端口:
$ docker ps
$ ps -aux | grep -v grep | grep docker-proxy
停止 doker 进程,删除所有容器,然后删除 local-kv.db 这个文件,再启动 docker 就可以了。
$ sudo service docker stop
$ docker rm $(docker ps -aq)
$ sudo rm /var/lib/docker/network/files/local-kv.db
$ sudo service docker start
更多推荐
所有评论(0)