Pet*_*ive 5 networking containers docker
当尝试将 Docker 容器分配给我新创建的桥接网络时,使用默认参数创建,如下所示:
docker network create myBridge
Run Code Online (Sandbox Code Playgroud)
然后将其分配给我的容器之一:
docker network connect myBridge containerName
Run Code Online (Sandbox Code Playgroud)
我收到以下错误消息:
Failed to add interface vetha4a00de to sandbox: error setting interface "vetha4a00de" IP to 172.21.0.3/16: cannot program address 172.21.0.3/16 in sandbox interface because it conflicts with existing route {Ifindex: 517 Dst: 172.21.0.0/16 Src: 172.21.0.1 Gw: Flags: [] Table: 254}
Run Code Online (Sandbox Code Playgroud)
我没有使用此子网的现有网络,我什至尝试在创建时定义一个完全不同的子网,但它仍然给我相同的消息。
将容器分配给默认桥接网络时也会发生同样的情况 - 而且它们似乎只在使用主机网络时才起作用。我在这里缺少什么吗?我不应该能够通过这样做将容器分配给桥接网络吗?
| 归档时间: |
|
| 查看次数: |
4937 次 |
| 最近记录: |