How Do I Expose Multiple Ports With Docker?

633    Asked by AmyAvery in Data Science , Asked on Nov 17, 2022

 I want to expose multiple ports to the machine’s interface. How to achieve this using a docker container?

Answered by Amit Sinha

For docker expose multiple ports, this is what you need to do:


  docker run -p :

To expose multiple ports, simply provide multiple -p arguments:

  docker run -p : -p :

Your Answer

Interviews

Parent Categories