Skip to content

🐞 Dagger engine crashes on startup with Apple container 1.0.0 (reduced default capabilities) #13459

Closed

Description

@eunomie

What is the issue?

Running the Dagger engine through Apple's container CLI v1.0.0 fails: the engine image is pulled and the container is created, but the engine crashes immediately on startup.

container CLI version 1.0.0 (build: release, commit: unspeci)
dagger v0.21.6 (image://registry.dagger.io/engine:v0.21.6) darwin/arm64/v8

Logs:
exec tini -- /usr/local/bin/dagger-engine --config /etc/dagger/engine.toml "$@"
time="2026-06-15T23:04:31Z" level=info msg="starting dagger engine version:v0.21.6 v0.21.6 linux/arm64/v8"
time="2026-06-15T23:04:31Z" level=info msg="configuring iptables backend: legacy"
...
shutting down telemetry...
telemetry shut down complete
dagger-engine: install resolv.conf: remount /etc/resolv.conf to upstream alias: operation not permitted

The fatal error is:

dagger-engine: install resolv.conf: remount /etc/resolv.conf to upstream alias: operation not permitted

This worked with older container releases (reporter was on 0.4.1-49) and broke after upgrading to 1.0.0. The crash reproduces reliably.

Root cause

container 1.0.0 reduced the default capability set and added --cap-add/--cap-drop. From the 1.0.0 release notes:

Support --cap-add and --cap-drop for containers. The default set of capabilities has been reduced, so if you need the old behavior that grants all capabilities, you will need to delete and recreate your containers.

CAP_SYS_ADMIN is no longer in the default set. The Dagger engine needs CAP_SYS_ADMIN to bind-mount /etc/resolv.conf during network setup (netinst.InstallResolvconf), which is one of the very first things it does at startup — hence the immediate crash with operation not permitted (EPERM).

The Dagger Apple container driver (engine/client/drivers/apple.go) sets runOpts.privileged = true (like the Docker driver, which maps it to --privileged), but apple.ContainerRun ignores opts.privileged — it passes no capability flags at all. With older container versions this was harmless because all capabilities were granted by default; with 1.0.0 the engine now starts under-privileged.

Apple's container has no --privileged flag; the equivalent is --cap-add ALL.

Steps to reproduce

  1. Install Apple container v1.0.0 on an Apple Silicon Mac.
  2. Run any dagger command so the engine is provisioned via the container driver.
  3. The engine container starts, then crashes with the install resolv.conf ... operation not permitted error above.

Expected

The engine starts successfully under Apple container 1.0.0, as it did with earlier versions.

Fix

Have the Apple driver honor opts.privileged by passing --cap-add ALL (Apple container's equivalent of Docker's --privileged).

Versions

  • dagger v0.21.6 (engine image registry.dagger.io/engine:v0.21.6), darwin/arm64
  • Apple container v1.0.0 (broken); v0.4.1-49 (working)

Activity

  1. added
    kind/bug
    on Jun 16, 2026
  2. added 2 commits that reference this issue on Jun 16, 2026
    3740886
    8d475cc
  3. added a commit that references this issue on Jun 16, 2026
    dd51633
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions