Skip to main content
added 8 characters in body
Source Link
Liam
  • 29.4k
  • 28
  • 137
  • 198

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

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.

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.

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.

Source Link
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.