前戏
jumpserver网络出问题了,然后使用命令进行删除,结果报错,如下
Error response from daemon: error while removing network: network jms_net id 5598f508eb9ec585b2b33e23eb8b4e0b8fa5d5fecde1538e5cc9f38c0ba07534 has active endpoints
docker network inspect jms_net
[ { "Name": "jms_net", #参数一 "Id": "5598f508eb9ec585b2b33e23eb8b4e0b8fa5d5fecde1538e5cc9f38c0ba07534", "Created": "2022-11-03T02:31:07.30889739+08:00", "Scope": "local", "Driver": "bridge", "EnableIPv6": false, "IPAM": { "Driver": "default", "Options": null, "Config": [ { "Subnet": "192.168.250.0/24", "Gateway": "192.168.250.1" } ] }, "Internal": false, "Attachable": true, "Ingress": false, "ConfigFrom": { "Network": "" }, "ConfigOnly": false, "Containers": { "3ac62b9eb115ebd8daaccbefad13a81f41e84e93463054d9f2206167d178c077": { "Name": "jms_redis", #参数二 "EndpointID": "ad639fa5753e64d9b3508eab07b839b95f82900874270246061e707965e48a85", "MacAddress": "02:42:c0:a8:fa:06", "IPv4Address": "192.168.250.6/24", "IPv6Address": "" }, "63638691bf92247d2b83483aba1df18099c8ad1a003b241efab866ad1af92168": { "Name": "jms_mysql", #参数三 "EndpointID": "a80090ff77b1d363c766649bae432091bdb72c0ff097fd3e8893689c48066e7b", "MacAddress": "02:42:c0:a8:fa:04", "IPv4Address": "192.168.250.4/24", "IPv6Address": "" } }, "Options": {}, "Labels": { "com.docker.compose.network": "net", "com.docker.compose.project": "jms", "com.docker.compose.version": "1.29.2" } }]
docker network disconnect
命令用于断开容器的网络。容器必须运行才能将其与网络断开连接。
名称,简写 | 默认 | 说明 |
| | 强制容器断开网络的连接 |
docker network disconnect -f jms_redis jms_mysqldocker network rm jms_net