Docker: Expose a range of ports

Is it possible to expose a range of ports while starting Docker container?

a command like so would be very helpful:

  • Docker LVM plugin install issues
  • Reduce SYS_ADMIN Linux capabilities
  • Listing the tags of a docker image on a Docker hub through the HTTP API
  • Sending Multicast Packets from Docker Container (to multicast group)
  • Can I use a Windows .Net app with Docker?
  • How to know if my program is completely started inside my docker with compose
  • docker run -p 127.0.0.1:8000-9000:8000-9000 
    

  • sudo docker build -t=“nisevi/static_web” is not working
  • Create Docker image for existing setup
  • Eclipse che cannot deploy web application archive
  • Live migration of a jboss/wildfly container with CRIU failed
  • Symfony app in Docker doesn't work
  • How to send node.js logs to Cloudwatch Logs from Elastic Beanstalk Docker application?
  • One Solution collect form web for “Docker: Expose a range of ports”

    Here is a similar question that caters your requirement as well.
    Docker expose all ports or range of ports from 7000 to 8000

    To summarize here, Yes it is possible since Docker version 1.5. You can expose port range when executing docker run command like this:

    docker run -p 192.168.0.10:8000-9000:8000-9000
    

    or

    docker run -p 8000-9000:8000-9000
    

    I have verified that its working fine on my machine using Docker version 1.6.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.