Docker Community Forums

Share and learn in the Docker community.

Share Docker between users

(Peter) #1

Is there a way to share one Docker installation (maybe multiple daemons, if it is possible) on one host between multiple users? It would be nice that every user could see only his/her containers.

(Peter) #2

Thanks to Hitoshi Harada, I found a way to run multiple docker daemons.

You basically start docker daemon specifying group, bridge, execdriver root, graph (images and containers FSs) root, socket etc. like this:

$ sudo docker daemon -D -G vasya -g /home/vasya/docker/g --exec-root=/home/vasya/docker/e -b br_peter --iptables=false -H unix:///home/vasya/docker/docker.sock -p /home/vasya/docker/

Then access daemon with:

$ docker -H unix:///home/vasya/docker/docker.sock ps

You can start multiple docker daemons for multiple users in this way, and users will not see other users’ docker images and containers.

But is it possible to share images between docker daemons to avoid redundant disk usage?