I want to run docker:dind and get a shell.
If I run docker run --privileged docker:dind sh it just exit.
The workaround is to run: docker run -d --privileged docker:dind
it starts in the background and then I can run docker exec -it <container> sh and get a shell.
But I want that it will start with a shell.
I created a Dockerfile:
FROM docker:dind
ENTRYPOINT sh
I built it:
docker build -t dind2 -f Dockerfile .
When I run docker run --rm -it --privileged dind2 I get a shell but when I tried to run simple container docker run busybox echo hi it failed with:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
Any idea how make docker:dind start with a shell without the workaround of running it in the background and then using exec to get a shell.