PODMAN:无法将IP分配给容器

时间:2020-09-23 21:41:09

标签: podman

我正在测试一个应用程序,并试图将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
        }
      }
    ]
}

0 个答案:

没有答案