Skip to content

Instantly share code, notes, and snippets.

@MrOplus
Created March 7, 2022 10:49
Show Gist options
  • Save MrOplus/4e83319ca245b9a78b818a0e0fba9026 to your computer and use it in GitHub Desktop.
Save MrOplus/4e83319ca245b9a78b818a0e0fba9026 to your computer and use it in GitHub Desktop.
docker macvlan
docker network create -d macvlan --subnet=172.16.0.0/21 --gateway=172.16.0.1 --ip-range=172.16.1.1/24 -o parent=eth0 pub_net
docker run --rm --network=pub_net --ip 172.16.1.3 dockerhub.ir/busybox ping google.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment