NethServer Documentation, Release 7 Final
config setprop
docker macVlanGateway 192.168.1.1 macVlanLocalNetwork 192.168.1.0/24
˓→
macVlanNetwork 192.168.1.224/27 macVlanNic br0
Then trigger the event
signal-event nethserver-docker-update
You have to specify to use the network macvlan for your container, the default docker0 is another network.
Docker creation example on macvlan
docker run --net=macvlan -dit --name nginx-test-02 --ip=192.168.1.225 --
˓→
restart=unless-stopped nginx:alpine nginx-debug -g 'daemon off;'
The container can be contacted at the relevant IP
curl http://192.168.1.225
In case of the proposed CIDR doesn’t fit your need, you should have a look to an
IP calculator
Please raise issues on
community.nethserver.org
.
49.11 Sources
Source are available
https://github.com/NethServer/nethserver-docker
Do'stlaringiz bilan baham: