Docker Community Forums

Share and learn in the Docker community.

Run docker in docker

(Dimple) #1

I need to do the following: do a docker run if an image and then inside that container(Container 1), do a docker run of another image. I have been researching on how to do this and have found that I need to bind mount /usr/bin/docker and var/run/docker.sock. However when I run that inside Container1 when I run docker i see the foll error:
[root@rvm /]# docker
docker: error while loading shared libraries: cannot open shared object file: No such file or directory
Upon searching for this error, I added few more -v to the docker run of Container 1 namely:
-v /lib64/
-v /lib64/
-v /lib64/ \

but still see the same error…
Do I need to do something else. Pls. advise ASAP.

FYI…I’m using RHEL 7


(Dimple) #2

FYI - When I change the -v to -v /lib64/ then it shows error for and when I add -v for it shows error for…
Has anyone tried to bind mount docker shared libs on RH 7 and advise which all I need to mount ?


(Dvohra) #3

Use dind.