Last active
April 9, 2023 14:52
-
-
Save petersem/c1dd64500ff04d516589bd7d278eda5e to your computer and use it in GitHub Desktop.
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
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: | |
nginx2: | |
environment | |
- PUID=1026 | |
- PGID=100 | |
- TZ=Australia/Brisbane | |
ports: | |
- '80:80' | |
container_name: nginx2 | |
mac_address: 02:42:c0:a8:84:23 | |
networks: | |
macv_network: | |
ipv4_address: 192.168.1.242 | |
volumes: | |
- ./nginx2/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