Docker Community Forums

Share and learn in the Docker community.

-p some_port:80


(Bobk48) #1

I would like to have some opinions and advice about exposing port 80 on multiple nginx containers using the -p option, where I either use different port numbers on the host such as 8086 or ephemeral port numbers for each container. That way, I can browse to each nginx container by just specifying the host ip address plus the port number on the host that maps to the particular Docker nginx container. I would do the same thing in lxc.
Is this advisable, standard practice, totally unacceptable, highly dangerous, or just another way of doing it?
Thanks!