Docker Class Notes
Dockerfile
========
Dockerfile is like a text file
which contains some instructions
to create a docker image
FROM
====
it is an instruction in a Dockerfile
it tells the docker ...please take this image FROM DockerHub
and use this image while crating container
FROM nginx (here nginx is an image name)
which is available inside DockerHub
nginx software is available in the form of image inside DockerHub
operating system is a software but is available in the form of image
we are using this image name inside AWS also
and use this image while creating server
folder structure or path
================
nginx default path = document root directory or folder structure
/usr/share/nginx/html
index.html
httpd default path = document root directory or folder structure
/var/www/html
index.html
whenever an end user requests any page,
immediately the nginx or httpd go to this location
and takes this pages and display to the end user..
========
Dockerfile is like a text file
which contains some instructions
to create a docker image
FROM
====
it is an instruction in a Dockerfile
it tells the docker ...please take this image FROM DockerHub
and use this image while crating container
FROM nginx (here nginx is an image name)
which is available inside DockerHub
nginx software is available in the form of image inside DockerHub
operating system is a software but is available in the form of image
we are using this image name inside AWS also
and use this image while creating server
folder structure or path
================
nginx default path = document root directory or folder structure
/usr/share/nginx/html
index.html
httpd default path = document root directory or folder structure
/var/www/html
index.html
whenever an end user requests any page,
immediately the nginx or httpd go to this location
and takes this pages and display to the end user..
how to create Dockerfile
========================
open Dockerfile
nano Dockerfile
FROM nginx
COPY index.html /usr/share/nginx/html
save and exit
========================
open Dockerfile
nano Dockerfile
FROM nginx
COPY index.html /usr/share/nginx/html
save and exit
step1: by using this docker file we create an image
step2: by using this image we create container
finally:----> Dockerfile -->create image --create Container --- so, finally our container contains an Application (image format)
Comments
Post a Comment