如何移除所有 docker 网络
为了移除所有 docker 网络接口(包括所有桥接接口),运行
remove_all_docker_networks.sh
docker network rm $(docker network ls -q)在你喜欢的 shell 中。
这将尝试移除一些无法移除的预定义网络,因此会向你显示这些错误消息:
docker_network_rm_errors.txt
Error response from daemon: bridge is a pre-defined network and cannot be removed
Error response from daemon: host is a pre-defined network and cannot be removed
Error response from daemon: none is a pre-defined network and cannot be removed你可以安全地忽略这些错误消息。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow