how to put a docker on the local subnet

so if you are like me and want to put a docker on your local subnet then all you need to do is:

docker network create -d macvlan --subnet=<subnet> --gateway=<gateway> -o parent=<ethernet name> <docker network name>
Example
docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=ens18 Local_Network

more info can be found here

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *