Skip to content

Commit c9fa423

Browse files
author
Mano Marks
authored
Merge pull request docker#184 from PaddySmalls/dockerfile_expose
Current description of EXPOSE command is misleading
2 parents 2ba7f3e + f4dc5b2 commit c9fa423

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

beginner/chapters/webapps.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,11 @@ Here's a quick summary of the few basic commands we used in our Dockerfile.
459459
CMD ["/bin/bash", "echo", "Hello World"]
460460
```
461461

462-
* `EXPOSE` opens ports in your image to allow communication to the outside world when it runs in a container.
462+
* `EXPOSE` creates a hint for users of an image which ports provide services. It is included in the information which
463+
can be retrieved via `$ docker inspect <container-id>`.
464+
465+
>**Note:** The `EXPOSE` command does not actually make any ports accessible to the host! Instead, this requires
466+
publishing ports by means of the `-p` flag when using `$ docker run`.
463467

464468
* `PUSH` pushes your image to Docker Hub, or alternately to a [private registry](TODO: add URL)
465469

0 commit comments

Comments
 (0)