View the IP address of the Container
View the mapped port of the Container docker port <container name or id> eg. docker port d8dac7399647 docker port hfq-jedi-zxf-eden Use iptables to view container mapping
Example of adding a new port mapping
Save iptables rules
illustrate
After the port mapping is completed, the result cannot be queried through docker port d8dac7399647 Can be
Query mapping relationship Additional knowledge: Mechanisms in Docker container communication and port exposure issues The link method has always been used for communication between Docker containers. This limits the order in which each container is started, which always feels inflexible. Therefore, this time we explored accessing containers directly through the LAN allocated by the Docker's own network card. Docker port exposure means forwarding the port service of the container itself to the exposed port through the forwarding of the docker0 network card, for example, executing:
When accessing using the 172.17.0.x local area network assigned by the docker0 network card, use port 12345. When using 192.168.1.x or other local public IP to access, you need to use 8080 to access Time is limited, so I won't analyze it in detail for now. I'll analyze it with pictures when I have time. The above article about Docker dynamically exposing ports to containers is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of Vue mixin usage and option merging
>>: Change the MySQL database engine to InnoDB
We can view the installation path of mysql throug...
0. Background Hardware: Xiaomi Notebook Air 13/In...
First, let's talk about why we use provide/in...
The load is generally estimated during system des...
Preface Under Linux, compilation and linking requ...
After the container is started Log in to admin fi...
HTTP Status Codes The status code is composed of ...
When using setinterval, it is found that it will ...
Table of contents 1. Development Environment 2. I...
Error message: Store update, insert, or delete st...
First we must understand that a TCP socket in the...
Table of contents verify: Combined with the examp...
<br />The information on web pages is mainly...
Now that we have finished the transform course, l...
When using nginx as a reverse proxy, you can simp...