停止并删除所有容器后,Docker不会释放端口 [英] Docker does not release ports after stop and remove all container

查看:1033
本文介绍了停止并删除所有容器后,Docker不会释放端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我停止并删除计算机中的所有容器之后,Docker不会释放端口绑定. 你有什么建议吗?

Docker doesn't release port binding after I stop and remove all of containers in my computer. Do you have any suggestion?

ricky@ricky-ubuntu:~$ sudo docker -v
Docker version 1.12.2, build bb80604
ricky@ricky-ubuntu:~$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
ricky@ricky-ubuntu:~$ sudo netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:5939          0.0.0.0:*               LISTEN      1464/teamviewerd
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1487/dnsmasq    
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      3623/cupsd      
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      2771/docker-proxy
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      1196/mongod     
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1325/mysqld     
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      3485/vino-server
tcp6       0      0 :::9999                 :::*                    LISTEN      2597/docker-proxy
tcp6       0      0 :::80                   :::*                    LISTEN      2787/docker-proxy
tcp6       0      0 :::8080                 :::*                    LISTEN      2755/docker-proxy
tcp6       0      0 :::7091                 :::*                    LISTEN      2763/docker-proxy
tcp6       0      0 ::1:631                 :::*                    LISTEN      3623/cupsd      
tcp6       0      0 :::443                  :::*                    LISTEN      2779/docker-proxy
tcp6       0      0 :::9888                 :::*                    LISTEN      2737/docker-proxy
tcp6       0      0 :::9889                 :::*                    LISTEN      2728/docker-proxy
tcp6       0      0 :::9090                 :::*                    LISTEN      2745/docker-proxy
tcp6       0      0 :::5800                 :::*                    LISTEN      3485/vino-server
tcp6       0      0 :::5900                 :::*                    LISTEN      3485/vino-server
tcp6       0      0 :::9997                 :::*                    LISTEN      2719/docker-proxy

推荐答案

如果"docker-compose down"或停止并删除容器没有帮助,我退出了docker,然后检查docker.backend是否仍在运行(com.docker Windows的.backend.exe). 终止该服务将释放我的端口.

If "docker-compose down" or stopping and removing containers didnt help, I quit docker, then check if the docker.backend is still running (com.docker.backend.exe for windows). Killing that service frees my ports.

另一种方法是在设置中重置为出厂默认值".但这应该是最后使用的解决方案,直到它删除您在Docker中设置的所有内容.

Another approach would be "reset to factory defaults" in settings. But that should be the last used solution till it removes everything you set up in Docker.

这篇关于停止并删除所有容器后,Docker不会释放端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆