dockINdock

To Install & run docker inside docker??

Docker :-

See Docker-in-Docker

[root@localhost ~]# docker run –it –-name abhi centos:latest
1

“privileged” mode — U can now run docker within docker itself, As we know that the privileged mode allows access to access to all devices connected to the host as similar to the host using those devices or resources. It actually allows the container to have almost the same access to the host as a process running outside containers on the host.

[root@localhost ~]# docker run –it –name abhi1 –privileged indocker:v1
2

And then next, install using & set-up repository

[root@8d71a48616eb /]# yum install –y yum-utilsyum-config-manager \--add-repo \https://download.docker.com/linux/centos/docker-ce.repo
3
4

Set-up repos file ( yum-config-manager \ ) in this time given error in this type then use this command :

[root@8d71a48616eb /]# dnf install langpacks-en glibc-all-langpacks -y

And then add repo file : yum-config-manager \

--add-repo \https://download.docker.com/linux/centos/docker-ce.repo
5

So, Install Docker

6

Let’s check Docker is working or Not ?

7
8

What is /var/run/docker.sock ?

If you are on the same host where docker daemon is running, you can use the /var/run/docker.sock to manage containers.

“ dockerd “ - is the persistent process that manages containers. Docker uses different binaries for the daemon and client. To run the daemon u type “dockerd”.

9

The docker run command can be used in combination with docker commit to change the command that a container runs.

To run the daemon with debug output, then use this command :

[root@8d71a48616eb /]# dockerd &
10

And then inside the Docker container that you just started, run some Docker commands, for example:

[root@8d71a48616eb /]# docker info

11

[root@8d71a48616eb /]# docker ps

12

Thank You !

--

--

I'm SONAM, Thanku everyone for joining & connecting with me 🤗. I always try to do & learn something new language in technology. 😊 DevOps work ✨

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sonam Kumari Singh

I'm SONAM, Thanku everyone for joining & connecting with me 🤗. I always try to do & learn something new language in technology. 😊 DevOps work ✨