[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [atomic-devel] podman user defined network support



On Wed, 2019-05-08 at 09:53 +0200, Farkas Levente wrote:
> hi,
> it seems that podman do not support network command. ie. it's not
> possible to create user defined network.
> 
> is it possible to create a user defined network somehow?
> 
> is it possible to define a user defined network is rootless mode?
> 
> since podman do not support --link how can communicate two container
> in
> a podman environment?
> 
> without this feature is there any other way than --net=host? since
> currently i can't find any other ways. eg. a db and a service
> container.
> 
> thanks in advance.
> 

In order to specific a specific network, you must create that network
with CNI.  These network descriptions are defined in /etc/cni/net.d and
podman ships a default one.  A while back, I created a secondary cni
network for doing some podman testing. I called the network podman2 and
the conf file appears as:

{
    "cniVersion": "0.3.0",
    "name": "podman2",
    "plugins": [
      {
        "type": "bridge",
        "bridge": "cni1",
        "isGateway": true,
        "ipMasq": true,
        "ipam": {
            "type": "host-local",
            "subnet": "10.99.0.0/16",
            "routes": [
                { "dst": "0.0.0.0/0" }
            ]
        }
      },
      {
        "type": "portmap",
        "capabilities": {
          "portMappings": true
        }
      }
    ]
}

The CNI project is outside podman and can be found -> 
https://github.com/containers/libpod/blob/master/test/e2e/common_test.go#L267
you might also want to checkout out their plugins subproject.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]