How to Install & run docker inside docker?
➤ Launch a container in “privileged” mode.
What is the “privileged” mode?
"Docker privileged mode grants a Docker container root capabilities to all devices on the host system. Running a container in privileged mode gives it the capabilities of its host machine."
docker run -it --privileged --name docker centos
➤ Install yum-utils & set-up repository
➤ Now Install the Docker in launched container
yum install docker-ce -y
➤ Now start the Docker Daemon
What is Docker Daemon?
"Docker daemon is installed on a host machine and essentially acts as the brain of the Docker. it creates and manages your Docker images."
➤ What is /Var/run/docker.sock ?
/var/run/docker.sock is basically the Unix socket the Docker daemon listens on by default. It is also a tool used to communicate with the Docker daemon from within a container.
dockerd &
dockerd is used for starting the Docker daemon
Comments
Post a Comment