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