Skip to content

Docker in UserModeLinux in Docker

Notifications You must be signed in to change notification settings

AkihiroSuda/diuid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker in User Mode Linux

An image for running a dockerd inside a user mode linux kernel. This way it is possible to run and build docker images without forwarding the docker socket or using privileged flags. Therefore this image can be used to build docker images with the gitlab-ci-multi-runner docker executor.

How it works

It starts a user mode linux kernel with a dockerd inside. The network communication is bridged by slirp. I didn't managed to get the "redir" of slirp to work and so i'm forwarding the docker socket using TCP reverse tunneling over an SSH connection from the uml kernel to the container.

Security

Because uml linux is using ptrace the image has to be started with --cap-add=SYS_PTRACE.

Example

Uml linux requires a tmpfs with exec access:

docker run -it --rm --cap-add=SYS_PTRACE -e TMPDIR=/umlshm --tmpfs /umlshm:rw,nosuid,nodev,exec,size=8g weberlars/diuid docker info

About

Docker in UserModeLinux in Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 62.1%
  • Dockerfile 37.9%