mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Forwarding a range of ports to QEMU #353
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @talkingdonkeyz on GitHub (Apr 21, 2022).
I am trying to use Newtek's video streaming protocol NDI within the macOS image. NDI randomly assigns ports between 49152 and 65535 to transmit on, and there is no way to choose or preempt which port it uses. I've tried the quick and dirty method of adding those 16383 ports to my docker-compose file, but that causes docker to timeout and crash. Is there any way I can forward a range of ports to QEMU? Any help would be massively appreciated! Thanks in advance.
Here is my docker file...
...and here is my docker-compose file...
@sickcodes commented on GitHub (Apr 21, 2022):
Ports get forwarded in Launch.sh or using
-e ADDITIONAL_PORTS-e ADDITIONAL_PORTS='hostfwd=tcp::90-:90,hostfwd=tcp::443-:443,hostfwd=tcp::10023-:80,' \@talkingdonkeyz commented on GitHub (Apr 21, 2022):
Thanks, I'm getting closer. I think the issue is the number of ports that need to be forwarded. I wrote a script to generate the 16383 arguments and added them to the docker-compose file but running it resulted in.
standard_init_linux.go:228: exec user process caused: argument list too long. Is there a way around this? I suppose what I'm looking for is something similar to docker expose where I would useEXPOSE 49152-65535or a way to dynamically forward ports as needed.I've looked into using OpenVPN to forward all of the ports into the docker-compose network over a single port. Along the lines of this post https://forums.debian.net/viewtopic.php?t=149522. But I'm hopeful there is a solution with less overhead.
@talkingdonkeyz commented on GitHub (Apr 30, 2022):
I got this working using OVPN. This issue might be helpful for anyone else attempting to do something similar https://github.com/kylemanna/docker-openvpn/issues/475
@sickcodes commented on GitHub (May 14, 2022):
Here's another cool way:
And then run
docker --network gluetun ....