Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 8
    Note that expose allows multiple ports - docs.docker.com/compose/compose-file/#expose - however you only supply the internal port rather than internal + external Commented Apr 24, 2019 at 14:02
  • 1
    That's very important part: 'Activates container to listen for a specific port only from the world inside' Commented Jul 24, 2020 at 10:53
  • actually, all these days I understood this concept in reverse order thank you!! Commented Jul 13, 2023 at 19:40
  • 1
    larsks claims this is incorrect stackoverflow.com/a/65785558/3755989 Commented Jan 11, 2024 at 8:58
  • When you say world inside docker, does it include all containers running on the same host (EC2 instance), even those containers outside the specific docker-compose file? Commented Jul 8, 2024 at 8:00