2

我正在测试应用程序并尝试将 IP 分配给容器,但它一直失败并显示以下消息:

# podman create \
   --hostname test1 \
   --name test1 \
   --net test_nw \
   --ip 172.16.1.90 \
   oraclelinux:7
Error: error running container create option: cannot set a static IP if
joining additional CNI networks: invalid argument

以下是网络配置:

# cat /etc/cni/net.d/88-racpub-bridge.conflist
{
    "cniVersion": "0.3.0",
    "name": "test_nw",
    "plugins": [
      {
        "type": "bridge",
        "bridge": "cni0",
        "isGateway": true,
        "ipMasq": true,
        "ipam": {
            "type": "host-local",
            "subnet": "172.16.1.0/24",
            "routes": [
                { "dst": "0.0.0.0/0" }
            ]
        }
      },
      {
        "type": "portmap",
        "capabilities": {
          "portMappings": true
        }
      }
    ]
}
4

0 回答 0