W
W
web2015master2016-01-19 23:34:35
ubuntu
web2015master, 2016-01-19 23:34:35

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

2 answer(s)
N
Nazar Mokrinsky, 2016-01-20
@web2015master

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.

I
Inna_N, 2016-01-20
@Inna_N

maybe when creating container docker run -p
https://docs.docker.com/engine/reference/run/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question