sudo apt install docker.io
After installing, you must perform these operations:
--> sudo usermod -aG docker ubuntu
After performing above operation logout and login to the instance.
--> We must use "Dockerfile" as the dockerfile name eerytime.
vim Dockerfile
In this Dockerfile
--> To implement an HTML File, write
From nginx:alpine
copy filename.html /usr/share/nginx/html
--> To create an image, use:
docker build -t imagename:latest .
--> To run the image (for html files only):
docker run -d -p portnumber:portnumber imagename:latest