Created
November 14, 2020 20:44
-
-
Save mohclips/552f53cd3cc2148c865ed34120984b2b to your computer and use it in GitHub Desktop.
How to define a container on the Local LAN
This file contains hidden or 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
--- | |
version: "2.4" | |
services: | |
test_localnet_ip: | |
image: alpine:latest | |
container_name: test_localnet_ip | |
command: tail -F anything | |
networks: | |
HomeLAN: | |
ipv4_address: 192.168.0.2 | |
networks: | |
HomeLAN: | |
driver: macvlan | |
driver_opts: | |
# set physical NIC eg. eth0 or physical NIC _and_ VLAN tag here eg. eth0.10 | |
parent: eth0 | |
ipam: | |
driver: default | |
config: | |
- subnet: 192.168.0.0/24 | |
gateway: 192.168.0.254 | |
# our range is .1 to .6 | |
ip_range: 192.168.0.0/29 | |
aux_addresses: | |
# IPs to ignore in the range above - don't hand these out | |
my_router: 192.168.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment