Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Ability to run Docker in User Mode Linux (diuid) on RancherOS #2859

Open
dnoland1 opened this issue Aug 10, 2019 · 3 comments
Open

Ability to run Docker in User Mode Linux (diuid) on RancherOS #2859

dnoland1 opened this issue Aug 10, 2019 · 3 comments

Comments

@dnoland1
Copy link

Need the ability to run Docker in User Mode Linux (diuid) on RancherOS. See https://github.com/weber-software/diuid . This requires Docker 19.03 (#2850), Kernel 4.8+, and additional kernel configuration (see https://github.com/weber-software/diuid/blob/master/KERNEL.config)

@niusmallnan
Copy link
Contributor

@dnoland1 When I first tried diuid on the RC build of 1.5.4, it didn't work.
I thought it was caused by the lack of certain settings in the ROS kernel, because the diuid needs the user mode kernel.

I took the time to investigate further and found that it was actually work, but there was a problem with the weberlars/diuid image.

I modified the Dockerfile and rebuilt the image. I did the following at ROS v1.5.4.

We should switch the docker to 19.03.1:

[root@ip-172-31-6-246 rancher] ros engine switch docker-19.03.1

Case A: run docker info

[root@ip-172-31-6-246 rancher]# docker run -it --rm --tmpfs /umlshm:rw,nosuid,nodev,exec,size=8g niusmallnan/diuid docker info
Docker: Docker version 18.09.7, build 2d0083d
Kernel: 5.2.0
Rootfs: Debian GNU/Linux 9.9 (stretch)

Configuration: MEM=2G DISK=10G
[ ok ] Starting OpenBSD Secure Shell server: sshd.
Formatting /persistent/var_lib_docker.img
waiting for dockerd ...........
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 18.09.7
Storage Driver: overlay2
 Backing Filesystem: extfs
....
....

Case B: run as a daemon

[root@ip-172-31-6-246 rancher]# docker run -itd --tmpfs /umlshm:rw,nosuid,nodev,exec,size=8g niusmallnan/diuid
438692563eb8d57e366def1695c7d48b90ea1d1111cd5bc11c83dbadc1658c98

[root@ip-172-31-6-246 rancher]# docker ps
CONTAINER ID        IMAGE               COMMAND                 CREATED             STATUS              PORTS               NAMES
438692563eb8        niusmallnan/diuid   "/entrypoint.sh bash"   3 seconds ago       Up 2 seconds                            adoring_williamson

[root@ip-172-31-6-246 rancher]# docker exec -it adoring_williamson bash
root@438692563eb8:/# docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        2d0083d
 Built:             Thu Jun 27 17:57:09 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       2d0083d
  Built:            Thu Jun 27 17:23:02 2019
  OS/Arch:          linux/amd64
  Experimental:     false
root@438692563eb8:/#

@dnoland1
Copy link
Author

@niusmallnan great! I tried same commands you ran above and worked for me. I’m curious, what were the changes required to fix the Dockerfile?

@niusmallnan
Copy link
Contributor

@dnoland1 This is my workaround: niusmallnan/diuid@9fe016f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants