Open HDebeuf opened 1 year ago
The particular syntax I'm using for the same approach (successfully) is
network_mode: "service: openvpn"
I believe using service
in compose means you're referencing another container started within this compose (composition?) whereas container
would refer to something started independently.
I haven't done any testing with your approach, but I am using double quotes on mine, which could play a role if it's looking for a string value on that key.
@ungerrj Thank you for the tip. I gave it a try by testing service and container mode, but unfortunately the same issue occurs.
I'm trying to setup a VPN client on a balena.io powered Raspberry Pi 4 from my local network to a remote network who has an OpenVPN server container set. The aim is to set an eclipse-mosquitto mqtt in my local network and let is subscribe to a remote eclipse-mosquitto mqtt instance to get securely remote Unraid server statistics and display results in my local Home Assistant dashboard.
The issue I encounter, is that my local mqtt instance doesn't start when I add the network_mode: service:openvpn. I've also tried with network_mode: container:openvpn. No logs are thrown helping me to discover the root cause. Trying with another container like nginx seems to result with the same issue. The OpenVPN client seem to correctly connect to the remote network as I am able to SSH into the container and ping my remote mqtt instance or other devices. When I remove the network_mode on the container, it starts as expected.
My compose file:
Have you got any advice for this kind of setup?
Thank you.
Best regards,