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
Dockerfilein 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-worldimage in the list. - To run the image just execute
docker run hello-worldand walah it will printhello-worldon the console. - If you want to delete file then run
docker rmi <image-id>. You can find the image id by executingdocker imagescommand.