This commit is contained in:
Kameron Kenny 2024-05-03 11:27:21 -04:00
parent 28b8f76408
commit 4e33675ed4
No known key found for this signature in database
GPG Key ID: E5006629839D2276
2 changed files with 21 additions and 14 deletions

21
4_provision_networks.sh Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
ip link set eth0 promisc on
docker network inspect infra_dev_net >/dev/null 2>&1 || \
docker network create -d macvlan --subnet 10.99.23.0/24 --gateway 10.99.23.254 -o parent=eth0.23 infra_dev_net
docker network inspect dns_local_net >/dev/null 2>&1 || \
docker network create -d macvlan --subnet 10.200.53.240/28 --gateway 10.200.53.254 -o parent=eth0.53 dns_local_net
docker network inspect pub_dns_net >/dev/null 2>&1 || \
docker network create -d macvlan --subnet 10.99.153.240/28 --gateway 10.99.153.254 -o parent=eth0.153 pub_dns_net
#docker network create -d macvlan --scope swarm --subnet 10.99.153.240/28 --gateway 10.99.153.254 -o parent=eth0.153 pub_dns_swarm_net
#docker network create -d ipvlan --subnet=10.99.22.0/24 -o ipvlan_mode=l2 -o parent=eth0.22 infra_dev_net
# SAMPLE DOCKER RUN WITH NEW NETWORK:
# docker run --name container1 --net infra_dev_net --ip 10.99.22.11 -dt ubuntu

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
ip link set eth0 promisc on
#docker network create -d macvlan --subnet 10.99.22.0/24 --gateway 10.99.22.254 -o parent=eth0.22 infra_dev_net
#docker network create -d macvlan --subnet 10.200.53.240/28 --gateway 10.200.53.254 -o parent=eth0.53 dns_local_net
#docker network create -d macvlan --subnet 10.99.153.240/28 --gateway 10.99.153.254 -o parent=eth0.153 pub_dns_net
docker network create -d macvlan --scope swarm --subnet 10.99.153.240/28 --gateway 10.99.153.254 -o parent=eth0.153 pub_dns_swarm_net
#docker network create -d ipvlan --subnet=10.99.22.0/24 -o ipvlan_mode=l2 -o parent=eth0.22 infra_dev_net
# SAMPLE DOCKER RUN WITH NEW NETWORK:
# docker run --name container1 --net infra_dev_net --ip 10.99.22.11 -dt ubuntu