tl;dr I want every container in this stack to use the same IP & MAC address and be on my local network but need help on how to
For starters I'm new to docker and docker-compose. I made a docker-stack for my Plex Servers (three of them, one for movies by general categories/tv-shows, music, and holidays) with each one having its own IP address & MAC on my local network and now I want to make a second stack for some of my media management tools but this time I'd like the whole stack to use one IP address and MAC address but I haven't been able to figure out how to do it correctly/so it works
This is running on a QNAP NAS (TVS1282v3/QTS) but I am working through the CLI as I leaned that if I do a docker-compose through container station that it won't create the network for me
version: '2.4'
services:
Sonarr:
image: linuxserver/sonarr
container_name: Sonarr
environment:
- TZ=AMERICA/Denver
- name= Sonarr
volumes:
- /share/MediaManagement/Sonarr/config:/config:rw
- /share/MediaManagement/rip:/rip:rw
- /share/Plex:/Plex:rw
ports:
- 8989:8989
restart: unless-stopped
Radarr:
image: linuxserver/radarr
container_name: Radarr
environment:
- TZ=AMERICA/Denver
- name= Radarr
volumes:
- /share/MediaManagement/Radarr/config:/config:rw
- /share/MediaManagement/rip:/rip:rw
- /share/Plex:/Plex:rw
ports:
- 7878:7878
restart: unless-stopped
Lidarr:
image: linuxserver/lidarr
container_name: Lidarr
hostname: Lidarr
environment:
- TZ=AMERICA/Denver
- name= Lidarr
volumes:
- /share/MediaManagement/Lidarr/config:/config:rw
- /share/MediaManagement/rip:/rip:rw
- /share/Plex:/Plex:rw
ports:
- 8686:8686
restart: unless-stopped
networks:
qnet-static:
ipv4_address: 192.168.2.100
mac_address: 05:4A:AA:08:51:43
networks:
qnet-static:
driver: qnet
ipam:
driver: qnet
options:
iface: "eth0"
config:
- subnet: 192.168.2.0/23
gateway: 192.168.2.1
I have also tried it like how it was set up in my Plex compose file where I put
services:
NameOfService:
mac_address: 05:4A:AA:08:51:43
networks:
qnet-static:
ipv4_address: 192.168.2.100
....
networks: ##At the end, not in each service##
qnet-static:
driver: qnet
ipam:
driver: qnet
options:
iface: "eth0"
config:
- subnet: 192.168.2.0/23
gateway: 192.168.2.1
in each service but only the first container worked....
I also tried this at one point but still no luck/ it's syntax is wrong
networks:
qnet-static:
driver: qnet
ipam:
driver: qnet
options:
iface: "eth0"
config:
- subnet: 192.168.2.0/23
gateway: 192.168.2.250
ipv4_address: 192.168.2.100
mac_address: 05:4A:AA:08:51:43
Any help would be appreciate it as I am probably just missing a minor piece
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…