Skip to content

privileged mode is incompatible with user namespaces. #8

Description

@eskuai

As a root user,

  1. Installed cargo install buildfs, ok
  2. toml file created
  3. sudo RUST_BACKTRACE=full buildfs run -o debian.ext4 build_script.toml
2025-09-07T08:24:48.478Z INFO  [buildfs::dry_run] Unpacked package into "build_script.toml" with build script located at "build_script.toml"
2025-09-07T08:24:48.479Z INFO  [buildfs::dry_run] Connected to container engine Docker
2025-09-07T08:24:49.680Z INFO  [buildfs::run] Pulled image: docker.io/library/debian:bookworm-slim

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/buildfs-0.3.4/src/container_engine/docker.rs:116:14:
Could not create container via Docker daemon: DockerResponseServerError { status_code: 400, message: "privileged mode is incompatible with user namespaces.  You must run the container in the host namespace when running privileged mode" }
stack backtrace:
   0:     0x55b0c574c089 - <unknown>
   1:     0x55b0c56c7b13 - <unknown>
   2:     0x55b0c574b942 - <unknown>
   3:     0x55b0c574bee3 - <unknown>
   4:     0x55b0c574b769 - <unknown>
   5:     0x55b0c57813e8 - <unknown>
   6:     0x55b0c5781349 - <unknown>
   7:     0x55b0c578192c - <unknown>
   8:     0x55b0c554588f - <unknown>
   9:     0x55b0c5545c05 - <unknown>
  10:     0x55b0c565b686 - <unknown>
  11:     0x55b0c56413d7 - <unknown>
  12:     0x55b0c5651e69 - <unknown>
  13:     0x55b0c564e1ab - <unknown>
  14:     0x55b0c5586113 - <unknown>
  15:     0x55b0c56733a2 - <unknown>
  16:     0x7f8540145575 - __libc_start_call_main
  17:     0x7f8540145628 - __libc_start_main_alias_2
  18:     0x55b0c554f0b5 - <unknown>
  19:                0x0 - <unknown>

My docker config:

root@darkstar:~/buildfs# cat /etc/docker/daemon.json
{
        "userns-remap": "default",
        "default-runtime": "crun",
        "userland-proxy": false,
        "runtimes": {
                "crun": {
                        "path": "/usr/bin/crun"
                }
        },
        "features": {
                "buildkit": true
        },
        "log-driver": "syslog",
        "log-opts": {
                "mode": "non-blocking"
        }
}

Exec docker


root@darkstar:~/buildfs# docker -v
Docker version 28.3.3, build 1.fc42

Then, should i to remove - "userns-remap": "default" - ?

Tx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions