Comment on How to get a unique MAC/DHCP IP for a Docker/Podman container without MACVLAN?
Oisteink@feddit.nl 1 day ago
I dont get it - are you trying to mimic vm’s with you docker containers? docker works great using the normal way of exposing ports from the internal docker net through the host. Making technology work in ways it wasnt designed for usually gives you a hard to maintain setup
glizzyguzzler@lemmy.blahaj.zone 1 day ago
Confused at this sentiment, Docker includes a MACVLAN driver so clearly it’s intended to be used. Do you eschew any networking in Docker beyond the default bridge for some reason?
Oisteink@feddit.nl 23 hours ago
There are other solutions than docker for that use-case that I think are better fits. It probably works fine, but for me other drivers including host mode and ipvlan seems to have been introduced to solve the wrong thing. Like how it needs privilege for them to work and how it exposes the containers network interface. For me it kinda breaks parts of why i would use docker.
Its my personal opinion and how i like to work.
You could probably make your setup work but it seems too complicated for me when you introduce a bridge as the root interface. Maybe with macvlan adapters on the host instead or in addition.
glizzyguzzler@lemmy.blahaj.zone 23 hours ago
I see, do you know of a way in Docker (or Podman) to bind to a specific network interface on the host? (So that a container could use a macvlan adapter on the host)
Or are you more advocating for putting the Docker/Podman containers inside of a VM/LXC that has the macvlan adapter (or fancy incus bridge adapter) attached?
Oisteink@feddit.nl 22 hours ago
No - i would advocate for not using docker if I need a network interface. But thats my opinion, and others will have a different one.
You can use macvlan networking, and if you need host<->container communication you give your host a macvlan interface instead or in addition to the root nic. Macvlan works “on top of” an existing interface, so theres no routing locally between the underlying nic and the macvlan nics.
If the host have several nic’s you can pass one through to a given container