docker - Docker:无法删除 macvlan 配置网络
问题描述
使用 portainer,我创建了一个 macvlan 配置网络。现在,我想删除这个网络。但是,由于某种原因,我不能。我确实收到以下错误消息:Error response from daemon: error while removing network: configuration network "my_macvlan_config" is in use
。奇怪的是,我不认为网络正在使用中。它没有连接容器。检查网络时,我得到以下结果:
~$ sudo docker network inspect my_macvlan_config
[
{
"Name": "my_macvlan_config",
"Id": "5d95270684516484632c4505e15ba8253bbe8d780b2c41a84a07fbbe09d7a9b6",
"Created": "2020-05-18T20:59:03.472260896+02:00",
"Scope": "local",
"Driver": "null",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "192.168.13.0/24",
"IPRange": "192.168.13.200/29",
"Gateway": "192.168.13.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": true,
"Containers": {},
"Options": {
"parent": "eth0"
},
"Labels": {}
}
]
Docker 本身正在我的 Synology Diskstation 上运行,fwiw。
编辑:有另一个网络称为macvlan
连接到my_macvlan_config
.
~$ sudo docker network inspect macvlan
[
{
"Name": "macvlan",
"Id": "8a831afa776475b01ca240f4b6b2434c820b8a03910b402760e3cd988e7ddb5c",
"Created": "2020-05-23T23:11:17.738229138+02:00",
"Scope": "local",
"Driver": "macvlan",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "192.168.13.0/24",
"IPRange": "192.168.13.210/29",
"Gateway": "192.168.13.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": "macvlan_config"
},
"ConfigOnly": false,
"Containers": {
"6f025749fe99a22fa3729bebfa72d6329b363fe8f6589d9147d0d58a9934dd42": {
"Name": "tvheadend",
"EndpointID": "bc827cb2fddc4374fde7634534efd0c8c110af5a70aa9b16a319b770dfe7a0f2",
"MacAddress": "02:42:c0:a8:0d:d3",
"IPv4Address": "192.168.13.211/24",
"IPv6Address": ""
}
},
"Options": {
"parent": "eth0"
},
"Labels": {}
}
]
还有一个网络,显然是无关的。
~$ sudo docker network inspect macvlan_config
[
{
"Name": "macvlan_config",
"Id": "644a15c6b9e653ec3f48c4a2e290f996b41361170d5ab63053b87a301168345f",
"Created": "2020-05-23T23:10:54.880348491+02:00",
"Scope": "local",
"Driver": "null",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "192.168.13.0/24",
"IPRange": "192.168.13.210/29",
"Gateway": "192.168.13.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": true,
"Containers": {},
"Options": {
"parent": "eth0"
},
"Labels": {}
}
]
然后我移除了tvheadend
容器。然后我能够删除所有网络,但my_macvlan_config
.
解决方案
推荐阅读
- python - 如何使用 BeautifulSoup 获取 p 下的 href 链接
- c++ - 创建 RAII 类时应该如何处理错误?
- typescript - 您可以在单个文件或代码块上拒绝严格模式等吗?
- python - Python recv 丢弃蓝牙数据?
- python - 用 Python 中的 BeautifulSoup、Selenium 解析表格
- google-sheets - 使用脚本硬编码条件格式
- razor - 如何使用 2sxc 和 ac# razor 模板将 CSS 类的动态列表添加到 div?
- android - 使用 react-native-elements 在 android 中显示的图标不正确
- mongodb - 无法在 ubuntu windows 中启动 mongodb 服务器
- visual-studio - 如何在没有管理员访问权限的情况下部署到 IIS