This repository contains Hello world dockerfile examples. It is mainly for the educational purposes. This could be helpful for those people who have just started learning Docker and want to create a simple docker image and execut it.
- You need to install the required docker packages.
- Copy the
Dockerfile
in the current directory - Run
docker build -t hello-world .
This will create the docker image which can be verified by runningdocker images
. This command will list all the images present on the host. You will noticehello-world
image in the list. - To run the image just execute
docker run hello-world
and walah it will printhello-world
on the console. - If you want to delete file then run
docker rmi <image-id>
. You can find the image id by executingdocker images
command.