Created
July 9, 2022 05:44
-
-
Save petersem/d04cfc8a642e98965c59c0ce1263308f to your computer and use it in GitHub Desktop.
Docker: compose macvlan example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compose.yaml | |
################ | |
networks: | |
macv_network: | |
driver: macvlan | |
driver_opts: | |
parent: eth0 | |
ipam: | |
driver: default | |
config: | |
- subnet: 192.168.1.0/24 | |
gateway: 192.168.1.1 | |
services: | |
nginx: | |
ports: | |
- '80:80' | |
container_name: nginx | |
mac_address: 02:42:c0:a8:84:22 | |
networks: | |
macv_network: | |
ipv4_address: 192.168.1.241 | |
volumes: | |
- /home/jblogs/docker/nginx/site-content:/usr/share/nginx/html | |
image: nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment