New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rootless Docker support (container init caused: write sysctl key net.ipv4.ping_group_range: write /proc/sys/net/ipv4/ping_group_range: invalid argument: unknown
)
#561
Comments
@igorcalabria did you test what was the difference. Was it just rootless image, |
@tonistiigi I dug a little deeper and found out that the issue is none of those things. Diffing the output of igor@desk:~$ docker run --rm --name buildx_buildkit_builder0 --privileged --userns=host moby/buildkit:buildx-stable-1
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key net.ipv4.ping_group_range: write /proc/sys/net/ipv4/ping_group_range: invalid argument: unknown. Without the flag, it seems to run fine(including pushing images with buildx):
So maybe we just need a flag to disable passing |
In my case at least, the exact same error appears to be happening when attempting to run The same suggestion (Creating the builder without |
@AkihiroSuda This works now, right? |
I just did a clean install of docker rootless on Ubuntu (got version 20.10.11) and this still fails.
|
Both $ $ docker info
Client:
Context: rootless
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.7.0-26-g202e9969)
compose: Docker Compose (Docker Inc., v2.0.1)
Server:
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 4
Server Version: dev
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: false
userxattr: true
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71
runc version: v1.0.3-0-gf46b6ba2
init version: de40ad0
Security Options:
seccomp
Profile: builtin
rootless
cgroupns
Kernel Version: 5.13.0-22-generic
Operating System: Ubuntu 21.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.6GiB
Name: suda-ws01
ID: CWVR:KJQU:3CNT:IJF7:FMME:22Y7:GKFW:AFKJ:IVLQ:JOVW:3KZY:S25M
Docker Root Dir: /home/suda/.local/share/docker
Debug Mode: false
Username: akihirosuda
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
$ docker version
Client:
Version: 20.10.2-327-ga45974a46.m
API version: 1.42
Go version: go1.16.11
Git commit: a45974a46
Built: Mon Dec 13 12:40:52 2021
OS/Arch: linux/amd64
Context: rootless
Experimental: true
Server:
Engine:
Version: dev
API version: 1.42 (minimum version 1.12)
Go version: go1.17.4
Git commit: 8955d8da89
Built: Mon Dec 13 12:39:07 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.5.8
GitCommit: 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ docker buildx inspect foo
Name: foo
Driver: docker-container
Nodes:
Name: foo0
Endpoint: rootless
Status: running
Platforms: linux/amd64, linux/386 |
@aarongable Could you try the master branch? |
Here's logs from my most recent attempt, after updating everything I could.
Unfortunately, it appears that I can't build docker from source on the master branch, as it uses buildx as part of its own build, and runs into the same error:
|
Aha, I figured out how to build just the buildx plugin from source and install it:
Unfortunately it doesn't seem to have changed the situation:
|
container init caused: write sysctl key net.ipv4.ping_group_range: write /proc/sys/net/ipv4/ping_group_range: invalid argument: unknown
)
This line seems causing the issue with Rootless Docker 20.10 (but not with moby/moby@master) buildx/driver/docker-container/driver.go Line 115 in 1927dba
$ docker run -d --privileged moby/buildkit:v0.9.3
7a3c5ca457c0f048790c491874aa442ce5c53f42c7f7b7781a569ee387ad9019
$ docker run -d --privileged --userns=host moby/buildkit:v0.9.3
2ccb580191eba64bd57cf409db062b1655dd6e53d1bdd80b2e894f69cd83b479
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: write sysctl key net.ipv4.ping_group_range: write /proc/sys/net/ipv4/ping_group_range: invalid argument: unknown. (Tested with clean installation of Ubuntu 21.10 with Docker 20.10.12) |
Should be fixed in moby/moby#43084 (target: Docker 20.10.13) |
Is there support for using buildx command with a rootless docker daemon? I tried the default buildkit image and the rootless one but both raises this error while booting up buildkit:
As a workaround, I found out that manually running buildkit with rootless config worked
You just gotta make sure that the name of the container matches the name of the buildx builder. In this case, my builder was named "builder" so the buildkit container had to be named "buildx_buildkit_builder0"
The text was updated successfully, but these errors were encountered: