Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a "multi-user" Docker mode, e.g. for scientific clusters?

I want to use Docker for isolating scientific applications for the use in a HPC Unix cluster. Scientific software often has exotic dependencies so isolating them with Docker appears to be a good idea. The programs are to be run as jobs and not as services.

I want to have multiple users use Docker and the users should be isolated from each other. Is this possible?

I performed a local Docker installation and had two users in the docker group. The call to docker images showed the same results for both users.

Further, the jobs should be run under the calling users's UID and not as root.

Is such a setup feasible? Has it been done before? Is this documented anywhere?

like image 338
Manuel Avatar asked Apr 27 '15 11:04

Manuel


3 Answers

Don't forget about DinD (Docker in Docker): jpetazzo/dind

You could dedicate one Docker per user, and within one of those docker containers, the user could launch a job in a docker container.

like image 117
VonC Avatar answered Oct 02 '22 08:10

VonC


There is an officially supported Docker image that allows one to run Docker in Docker (dind), available here: https://hub.docker.com/_/docker/. This way, each user can have their own Docker daemon. First, start the daemon instance:

docker run --privileged --name some-docker -d docker:stable-dins

Note that the --privileged flag is required. Next, connect to that instance from a second container:

docker run --rm --link some-docker:docker docker:edge version
like image 37
Demitri Avatar answered Oct 02 '22 09:10

Demitri


OK, I think there will be more and more solutions pop up for this. I'll try to update the following list in the future:

  • udocker for executing Docker containers as users
  • Singularity (Kudos to Filo) is another Linux container based solution
like image 25
Manuel Avatar answered Oct 02 '22 09:10

Manuel