Sharing `/usr/bin/docker` and `/usr/var/docker.sock`

Hi,

My build system use container to build container.

I’m not using the Docker in Docker tool but I’ll just want to share the /usr/bin/docker and /usr/var/docker.sock of the circleci image.

When I try, the container just stop with a 255 error:

ubuntu@box1337:~$ docker run -ti -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock ubuntu bash
ubuntu@box1337:~$ docker ps -a
CONTAINER ID        IMAGE                 COMMAND                  CREATED              STATUS                            PORTS               NAMES
d3ed17a0b6d7        ubuntu                "bash"                   4 seconds ago        Exited (255) 2 seconds ago                            naughty_darwin

Is this a wanted restriction ?
I didn’t find documentation on that.

1 Like

Related post