Greetings,
I have docker compose (gluetun) - which is a VPN container
---
version: '2.4'
services:
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
environment:
- PUID=1029
- PGID=100
- VPNSP=private internet access
- REGION=CA Ontario
- OPENVPN_USER=#### #Change to YOUR Username
- OPENVPN_PASSWORD=###### #Change to YOUR Password
volumes:
- /volume1/docker/gluetun/config:/gluetun
ports:
- 19999:19999 #Netdata
- 9080:9080 #QBitTorrent Web-UI
- 6881:6881 #QBitTorrent
- 6881:6881/udp #QBitTorrent
cap_add:
- NET_ADMIN
restart: unless-stopped
if I have another container that I want to use the first one as it’s main network to use the VPN connection, what I am supposed to change/add in the other docker container compose file?
Here is the default container yml for my second container
---
version: "2"
services:
heimdall:
image: linuxserver/heimdall
container_name: heimdall
environment:
- PUID=1024
- PGID=100
- TZ=America/Toronto
volumes:
- /volume1/docker/Heimdall/config:/config
ports:
- 555:80
- 4455:443
restart: unless-stopped
Note:
It says in the guide to use the following line to connect, but how exactly it should look like
Container in another docker-compose.yml
Add network_mode: "container:gluetun"
to your docker-compose.yml , provided Gluetun is already running.
Thanks in advance.