Docker Community Forums

Share and learn in the Docker community.

How to add additional network interfaces when creating the container?

docker

(Mjsaber) #1

Hi guys,

I’m trying to setup some network interfaces when creating the docker container. Like loopback(lo:0, lo:1, etc) and ipip tunnel (tunl0). I can do this after the container is up by executing commands like “ifconfig lo:0 [ip] netmask 255.255.255.255 up”. But I’m thinking if there is a way that I can do this during the setup, use docker api. By looking at the documentation (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/create-a-container), I find that the “NetworkingConfig” entry is promissing, but there’s no detail explaination about this configuration. Can someone help me with this?

Thanks!


(Mjsaber) #2

Is there anyone can help with this?