I need to create 3 separate docker containers (with alpine) and I need the network interface to be accessible from the local network (same as host, but DHCP and individual interaces on each, not all like when using --net=host) can someone help me accomplish this?
Thanks!
EDIT:
On my RPI build (Raspbian) I was creating 3 macvlans
ip link add link eth0 name eth0.1 address xx:xx:xx:xx:xx:xx type macvlan
ip link add link eth0 name eth0.2 address xx:xx:xx:xx:xx:xx type macvlan
ip link add link eth0 name eth0.3 address xx:xx:xx:xx:xx:xx type macvlan
But when I created my containers and assiged --net=eth0.0 I get a network not found error.
# Run dockers
docker run -d --name=‘alpine1’ --net=‘eth0’ --ip=“$ip4.101” ‘alpine’ tail -f /dev/null
docker run -d --name=‘alpine2’ --net=‘eth0’ --ip=“$ip4.102” ‘alpine’ tail -f /dev/null
docker run -d --name=‘alpine3’ --net=‘eth0’ --ip=“$ip4.103” ‘alpine’ tail -f /dev/null
Problem now is, if I use this RPI on another network that does not use subnet mask 0/24 and/or gateway .1 and/or ip addresses 101 thru 103, this will not work
Can I create a docker network macvlan that uses DHCP?
I have done some quick testing and I do not think the macvlan plugin is supported in balena-engine. I have asked a collegue from the balena-engine team to comment though, as I may be mistaken.
I don’t think it will be a case of adding them; we deliberately removed the plugin system from moby to reduce on-disk space usage. I am only unsure if this also included macvlan which is what I have asked for clarification of, but I would not expect that it would be desirable to add it back in.
We also offer custom board support plans which may better suit you, you can reach out to our sales folks directly if you are interested (https://www.balena.io/contact-sales).
Hi guys, I came to this thread when I was looking about macvlan support on BalenaOS.
Has this situation changed in the past few months or there are still no plans for this plugin to be already baked in on the images that Balena provides?
Thanks!