nestybox / nestybox/sysbox

writing /etc/resolv.conf caused: open /etc/resolv.conf: permission denied: unknown without "userns-remap":"sysbox"; kernel version is fine

Open
#799 4 comments 0 reactions 1 assignee View on GitHub

@ctalledo is already working on this.

Since May 8, 2024.

bug
Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

Despite it's said in https://github.com/nestybox/sysbox/blob/master/docs/user-guide/install-package.md#docker-userns-remap that "Starting with Sysbox v0.5.0, configuring Docker in userns-remap mode is no longer required, even if the host has no support for shiftfs. However, without shiftfs, you will need a host with kernel >= 5.12 so that Sysbox can use the kernel's ID-mapped mounts feature." - it doesn't work unfortunately.

Full error message:

$ docker compose up ci-runner
[+] Running 1/0
 ✔ Container ci-runner-ci-runner-1  Recreated                                                                                                                                                                               Attaching to ci-runner-1
Error response from daemon: failed to create task for container: failed to create shim task:
OCI runtime create failed: container_linux.go:439: starting container process caused:
process_linux.go:608: container init caused: switching Docker DNS: rootfs_linux.go:1420:
writing /etc/resolv.conf caused: open /etc/resolv.conf: permission denied: unknown

# uname -a
Linux ip-10-40-83-20 5.15.0-1009-aws #11-Ubuntu SMP Thu May 26 19:39:49 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

# dpkg -l | grep sysbox
ii  sysbox-ce                         0.6.4.linux

# dpkg -l | grep docker
ii  docker-buildx-plugin              0.14.0-1~ubuntu.22.04~jammy             arm64
ii  docker-ce                         5:26.1.1-1~ubuntu.22.04~jammy           arm64
ii  docker-ce-cli                     5:26.1.1-1~ubuntu.22.04~jammy           arm64
ii  docker-ce-rootless-extras         5:26.1.1-1~ubuntu.22.04~jammy           arm64
ii  docker-compose-plugin             2.27.0-1~ubuntu.22.04~jammy             arm64

# cat /etc/docker/daemon.json
{
    "runtimes": {
        "sysbox-runc": {
            "path": "/usr/bin/sysbox-runc"
        }
    },
    "default-runtime": "sysbox-runc",
    "bip": "172.20.0.1/16",
    "default-address-pools": [
        {
            "base": "172.25.0.0/16",
            "size": 24
        }
    ]
}

When I add "userns-remap": "sysbox", it starts working.

The container image is based on "ubuntu:22.04".

I wanted some minimally changed configuration to work, since it's said that sysbox version and kernel version are new enough for it all to work without userns-remap.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.