Docker Community Forums

Share and learn in the Docker community.

Exposing ports only to localhost


(Prumand) #1

Hello,

I couldn’t find a possibility to limit exposed ports to localhost only. I would even love to have the pinata option back, not binding to localhost at all. But not exposing application in development is a must have. Or did I miss something?

Expected behavior

If option is ticked (or even default), exposed ports are only reachable from localhost.

lg


(Prumand) #2

I realized that you can limit port exposure by e.g. 127.0.0.1:443:443 (https://docs.docker.com/v1.8/compose/yml/#ports).