Hey Guys! I was wondering if
docker container run -d -p 80:8080 node
is the same as
docker container run -d -p 127.0.0.1:80:192.168.1.5:8080 node
.
So is there an implicit addition of the IP when writing only 80:8080??
Hey Guys! I was wondering if
docker container run -d -p 80:8080 node
is the same as
docker container run -d -p 127.0.0.1:80:192.168.1.5:8080 node
.
So is there an implicit addition of the IP when writing only 80:8080??
Flag value | Description |
---|---|
-p 8080:80 |
Map TCP port 80 in the container to port 8080 on the Docker host. |
-p 192.168.1.100:8080:80 |
Map TCP port 80 in the container to port 8080 on the Docker host for connections to host IP 192.168.1.100. |
Refer to: