Skip to main content
1 of 2
PhantomReference
  • 738
  • 2
  • 14
  • 27

If you are creating a container from an image and like to expose multiple ports (not publish) you can use the following command:

docker create --name container name --expose 7000 --expose 7001 image name

Now, when you start this container using the docker start command, the configured ports above will be exposed.

PhantomReference
  • 738
  • 2
  • 14
  • 27