-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for publishing ranges of ports #8899
Comments
👍 |
Can we please merge this one? It's quite useful. Thanks! |
Closes moby#8899 Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
docker run -help doesn't show the new option for port range -p, --publish=[] Publish a container's port to the host |
one more bug on every port it ads new line so docker ps becomes unreadable. |
@vipconsult I think the output of ps is being worked on here; #10339 |
@vipconsult @thaJeztah yeah, I'll be adding published ranges in |
Are there any limits on port ranges? If I But if I do same from the host ip it just gets stuck loading the page: |
@dkirrane is your webservice perhaps only listening on |
@dkirrane your service's ports are being published on random host ports. Try this:
|
Be aware that starting a container with a large published range of ports like that is currently quite slow. I didn't dig into it, but I'm assuming the reason is that Docker is creating individual |
^^ oh, correct, wasn't paying attention |
@md5 Ya sorry that was a typo. I've reduced the number of ports & mapped the port-range as described: Now from the host machine if I curl to my docker service using localhost the page returns. However, when I use the Host IP curl fails
|
I'm not sure why you're using that method to get your host IP address, but I think you're getting the wrong IP to pick up the port mapping. That command is giving you your outbound gateway address for the default route, not the host IP. |
Given the ability to
--expose
ranges of ports from #8167, it would be useful to be able to publish ranges of ports as well. I'd like to be able to do this:The text was updated successfully, but these errors were encountered: