0

I want to run docker daemon using systemd docker start but there's no systemd in docker container. I can't use dind images because the the container is based on a different image and changing base image would require lot of work.

I don't want to mount /var/run/docker.sock as I can access images and container inside the host VM.

Please help me in running docker inside a docker container.

Tried running systemd docker start. Doesn't work because the PID=1 is the CMD=[start.sh] in the Dockerfile.

  • You want to run Docker in a container...in Docker? – tadman Jun 23 '23 at 00:47
  • Note there's usually only the absolute minimum inside a container by design, and there certainly won't be `systemd` present. Docker itself acts as a sort of higher-level `systemd`, starting and stopping *containers*, not processes. – tadman Jun 23 '23 at 00:48
  • Yes I want to run Docker inside a container.. in docker. This might sound weird but I have this use case and can't do anything about it. – SanjeethBoddi Jun 23 '23 at 19:28
  • You can think of it as each container is assigned to a user as an isolated work environment. They must be able to use docker to build and test their code. – SanjeethBoddi Jun 23 '23 at 19:31
  • I mean [good luck with that](https://stackoverflow.com/questions/27879713/is-it-ok-to-run-docker-from-inside-docker) I guess. – tadman Jun 23 '23 at 20:01

0 Answers0