Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expose a random port

Tags:

docker

I'm using docker to deploy a software that uses a random RTP port. How can I EXPOSE a big range of ports? Can I possibly expose all ports of the docker Instance?

I haven't been able to find a way to do this in the Docker documentation.

like image 986
To Do Avatar asked Feb 12 '23 16:02

To Do


1 Answers

This is currently (Docker 1.0.1) not possible.

Other people have expressed strong interest in being able to expose and publish port ranges, and the Docker team is okay with that, see here.

Some code has even been proposed (see pull request here).

I guess it will be implemented soon, maybe get in touch with them to know if someone plans to work on that again.

like image 56
mbarthelemy Avatar answered Jun 02 '23 00:06

mbarthelemy