Skip to content

Commit 5b47fa4

Browse files
committed
fix terminology EXPOSE -> port mapping
1 parent 79a8aba commit 5b47fa4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

chapter_09_docker.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,10 @@ so the ports _inside_ the container are different
10731073
from the ports _outside_ the container, the ones we can see on our host machine.
10741074

10751075
So we need to tell Docker to connect the internal ports to the outside ones,
1076-
or "expose" them, in Docker terminology.
1076+
to "publish" or "map" them, in Docker terminology.
1077+
// CSANAD: "expose" is different, it's for inter-container communication and it's
1078+
// done by the EXPOSE instruction in the Dockerfile. The -p is short for
1079+
// --publish and this is port mapping.
10771080

10781081
`docker run` takes a `-p` argument, with the syntax `OUTSIDE:INSIDE`.
10791082
So you can actually map a different port number on the inside and outside.
@@ -1112,7 +1115,7 @@ curl: (52) Empty reply from server
11121115

11131116
==== Essential Googling the Error Message
11141117

1115-
The need to expose ports and the `-p` argument to `docker run` are something you just learn,
1118+
The need to map ports and the `-p` argument to `docker run` are something you just learn,
11161119
fairly on in learning Docker. But the next debugging step is quite a bit more obscure
11171120
(although admittedly Itamar does address it in his
11181121
https://pythonspeed.com/articles/docker-connection-refused/[docker networking article],

0 commit comments

Comments
 (0)