Step 1 : Docker pull centos
1.
We used privileged mode because to
run docker engine inside docker container it will be failed due to some
security reason. A privileged container means it have all root
capabilities of host machine
2.
Docker store all data like containers, images,
networks, plugins and many mores inside in one place that is /var/lib/docker, so
this folder is most important folder. We know if we terminate any container
than all the content inside the container will be removed. So, for that reason
we create a folder that is mystorage inside in host machine
and linked this folder with that folder /var/lib/docker means
we create a persistent storage of that folder /var/lib/docker
Now we install docker on centos environment for
that first we create a repo file inside in /etc/yum.repos.d
Step 3 : vi /etc/yum.repos.d/docker.repo
Step 4 : Write this command
Write this content to this repo file
[docker]
baseurl=https://download.docker.com/linux/centos/7/x86_64/stable/
gpgcheck=0
Comments