Docker Community Forums

Share and learn in the Docker community.

Run docker in docker


(Dimple) #1

Hi,
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: libsystemd-journal.so.0: 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/libsystemd-journal.so.0:/usr/lib/libsystemd-journal.so.0
-v /lib64/libsystemd-id128.so.0:/usr/lib/libsystemd-id128.so.0
-v /lib64/libdevmapper.so.1.02:/usr/lib/libdevmapper.so.1.02 \

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

FYI…I’m using RHEL 7
Thanks

Dimple


(Dimple) #2

FYI - When I change the -v to -v /lib64/libsystemd-journal.so.0:/lib64/libsystemd-journal.so.0 then it shows error for liblzma.so.5 and when I add -v for liblzma.so.5 it shows error for libudev.so.1…
Has anyone tried to bind mount docker shared libs on RH 7 and advise which all I need to mount ?

Thanks
Dimple


(Dvohra) #3

Use dind.