黄舟2017-04-21 10:57:47
Of course it is possible, buddy, you can read the document carefully. There are instructions in the document. If the option format of a parameter is [], such as
-H=[]host
-p=[]portdirection
This means that this flag can appear multiple times, so the port mapping rule can be specified multiple times here.
In addition, this can be implemented using EXPOSE in the Dockerfile. Of course, it can also be specified multiple times.
天蓬老师2017-04-21 10:57:47
Yes, for example: docker run -d -p 80:80 -p 22:22
Map 80 and 22 to host respectively