Hello,
I’m desperate for macvlan right now. My Ubuntu shows me no eth0 interface under ifconfig -a but the eno1 which is my network interface.
But if I want to use it in MACVLAN, I get the error message:
Failure
invalid subinterface vlan name eno1, example formatting is eth0.10
Portainer doesn’t know where it is running. There is no point of using MacVLAN in Docker Desktop since the virtual machine in which containers are running (yes, always, even on Linux) has its own private network. You can’t use your real LAN.
Every container has its own IP address just not on your LAN and you almost never need it since you can use a reverse proxy/load balancer.
If you ask whether you can make containers use a LAN ip with Docker desktop, there is no way. As I wrote above, you can run a proxy server and route traffic through the proxy based on DNS.
hm but thats not the solution. That is in my understanding a solution for http. But for example IObroker need many other ports depending on which protocol and which sensor i want to collect. Thats why i want independend IP adresses.
Traefik can balance layer 7 traffic for http(s) endpoints and layer 4 traffic for udp/tcp ports. While layer 7 traffic allows rules based on hostname and path, layer 4 does not.
So if you need mqtt on a different port, then Traefik can still use layer4 balancing from the host port to a container.
It boils down to two options:
stick with Docker Desktop and use Traefik
replace Docker Desktop with docker-ce, and use macvlan with docker-ce
Without adding more options I just wanted to mention that the main purpose of Docker Desktop is making development easier, but it won’t make everything easier so if you are not using it for development, I still recommend using Docker CE.