'Add a vxlan interface to a docker container

I need to configure a vxlan interface on a docker container that runs our router service. Is it possible to add an interface to a docker container? This is based on the alpine container.



Solution 1:[1]

You can't add an interface to a docker container. It doesn't have virtualized hardware like a VM. You can however add an interface to the host from within the docker container if you have host networking enabled when building the container. You will then be able to use that interface from within the container.

Not you'll need to add the net capabilities to the container when you build it in order to create an interface.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joseph Ferrero