Search code examples
dockerjenkinsjenkins-docker

run docker in jenkins container (docker in docker)


Im trying to run docker inside jenkins container, i used this command to create jenkins container

docker run -p 8080:8080 -p 50000:50000 -d -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker jenkins/jenkins:latest

then this command to access jenkins container bash docker exec -u 0 -it <container-id> bash, whenever i run docker i get this error

docker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by docker) docker: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by docker)

What is creating this problem and what ways in order to solve it ?


Solution

  • solved by downgrading my server OS to Ubuntu 18