karthequian/docker-helloworld

Feedback!

karthequian opened this issue · 2 comments

🔊 If you have feedback for me, please let me know by commenting in this issue.
⭐️ Consider starring the project to let me know that you use it.
❤️ Thank you!

Newbie, here. Can you show how to build the image from the Dockerfile.

Hi @aurotripathy! Great question- to build from the dockerfile, in general you will want to run the command from the directory where the Dockerfile is by running something like this:

docker build -t my-first-helloworld:latest .

The -t is the tag command to tag the newly built image, and can be tagged with whatever name you want to give it. Then, you should be able to run the image locally by saying docker run:

docker run -p 80:80/tcp "my-first-helloworld:latest"

Read more about all the options here: https://docs.docker.com/engine/reference/commandline/build/#options