Skip to content

HimakarC/Docker

Repository files navigation

Installing Docker

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.

To write a DockerFile:

--> 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published