Exposing network ports In fact, there are two parameters in Docker that involve exposing network ports, namely -p and -P. The following will introduce them separately. -P With -P, Docker will randomly assign an unused port to the application on the host and map it to the open port in the container. -p The -p parameter has several different uses: hostPort:containerPort This usage is to bind the host port and the container port, as follows: The above command means mapping port 80 of the host machine to port 80 of the container. The first port 80 is port 80 of the host machine, and the second port 80 is port 80 of the container. ip:hostPort:containerPort This method maps the port of the specified IP address to the port of the container. as follows: Map port 80 of the 192.168.0.195 address to port 80 of the container. ip::containerPort This method maps a random port of a specified IP address to an open port of a container, as follows The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed process of implementing the 2048 mini game in WeChat applet
>>: MySQL query sorting and paging related
The shutdown.bat file has a sentence if not "...
Table of contents 1. Data Type 1. What is MySQL s...
Introduction Part 1: Written at the beginning One...
We can create jsx/tsx files directly The project ...
Table of contents 1. Introduction to v-slot 2. An...
1.core file When a Segmentation fault (core dumpe...
Table of contents Show Me The Code Test the effec...
Preface We all know that the import and export of...
1. Python installation 1. Create a folder. mkdir ...
To beautify the table, you can set different bord...
There was a problem when installing the compresse...
In requireJS, there is a property called baseURL....
Table of contents 1. Installation 1. Introduction...
query_cache_limit query_cache_limit specifies the...
Table of contents introduce Link start Continue t...