There are various ways to connect a container to Gluetun.
💡 If you are connecting containers to Gluetun's network stack, you might want to also check the Port mapping page to know how to access ports of containers connected to Gluetun.
Add network_mode: "service:gluetun"
to your second container so that it uses the gluetun
network stack.
There is no need for depends_on
.
Add --network=container:gluetun
when launching the container, provided Gluetun is already running.
Add network_mode: "container:gluetun"
to your docker-compose.yml, provided Gluetun is already running.