Skip to content

Instantly share code, notes, and snippets.

@petersem
Last active April 9, 2023 14:52
Show Gist options
  • Save petersem/c1dd64500ff04d516589bd7d278eda5e to your computer and use it in GitHub Desktop.
Save petersem/c1dd64500ff04d516589bd7d278eda5e to your computer and use it in GitHub Desktop.
Macvlan example
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