kogany
kogany

Reputation: 33

Docker EXPOSE a port only to bridge

I want to map container port only to internal docker bridge (172.17.0.*) If it's possible ?

Thanks for help

Upvotes: 0

Views: 823

Answers (1)

BMitch
BMitch

Reputation: 263636

All ports between containers on the same docker network are accessible to each other. There is no need to expose ports, expose is only needed to document the port by the image creator for the admin running the container. Publishing ports is only needed to make a specific port available outside of the host. For your requirement, there's nothing to do, it's the default behavior.

Upvotes: 2

Related Questions