I've been experimenting with moving my seedbox into a Docker container and I think I'm up against a chicken/egg problem:
The current seedbox setup has OpenVPN running (all internet goes through the VPN) through privateinternetaccess.com. I have a script (https://github.com/firecat53/pia_transmission_monitor) that checks with PIA for the assigned forwarded port and then updates transmission-daemon accordingly with the port and bind address.
The problem is that the assigned forwarded port is checked hourly and it can change at any time...and I need to know the port before running the Docker container so I know which ports to pass through to/from the container. I was intending to run OpenVPN inside the container as well, but without knowing in advance which port to assign to the container I'm not sure this is going to work.
A very hackish solution could be to run OpenVPN and another Docker daemon inside one container, then run the transmission container inside the OpenVPN container. This seems waay to complex though so I haven't actually tried it yet.
Am I missing something really obvious here? Any other ideas?
Thanks!
Scott
I finally managed to get Transmission-daemon running inside the Docker container through an OpenVPN connection to Privateinternetaccess.com.
Here is the Dockerfile and the various configuration files and scripts needed to make this work. I'm open to any simplifications and/or alternate ways of achieving this! Some notes:
OpenVPN requires running the container with the --privileged flag in order to create the tun0 connection.
I could only make it work right by using Pipework along with a bridge on the host to give the container it's own IP address on the network.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With