docker-archive / classicswarm

Swarm Classic: a container clustering system. Not to be confused with Docker Swarm which is at https://github.com/docker/swarmkit
Apache License 2.0
5.75k stars 1.08k forks source link

docker swarm mode published port range #2924

Closed juangps96 closed 4 years ago

juangps96 commented 5 years ago

port range When publishing ports with docker run, we can have docker dynamically choose a host port from within a specified range

Here, docker has chosen a free port in the range 30005-30010 on the host to map to the container's port 80. It does not seem possible to do this with docker swarm services, either using the cli or compose files. e.g. ~ $ docker service create -p 30005-30010:80 alpine tail -f /dev/null invalid argument "30005-30010:80" for p: invalid hostport binding (30005-30010) for port (80)

Text took from: https://stackoverflow.com/questions/47792383/docker-swarm-published-port-range

I've create a new issue because the comment on the link above

dr3adx commented 4 years ago

BUMP

justincormack commented 4 years ago

This repo is for classic swarm, not swarmkit (swarm mode).