Answer the question
In order to leave comments, you need to log in
How to make a port visible from the outside in Ubuntu?
Good afternoon. I use Docker at work, but I can't create an image using a Dockerfile. Too difficult. I decided to make all the changes manually in the container created from ubuntu:latest, in order to then "commit" everything into the image. Confused when working with ports. Which command in Ubuntu does the same thing as "EXPOSE 80" in the Dockerfile?
Thanks for the help.
Answer the question
In order to leave comments, you need to log in
1) In the Dockerfile, you write the same thing that you would do manually, so think carefully - and then use it many times; I started with manual configuration myself, I do not recommend
2) No, this does not apply to Ubuntu itself; you can do the same when starting the container using the -p switch, or make an almost empty Dockerfile with the EXPOSE 80 command to embed it into the image
. By the way, if it's not a secret, what exactly are you going to build? Maybe I will advise what, I have developments with open source.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question