Repository navigation
Description
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-addand--cap-dropfor 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
- Install Apple
containerv1.0.0 on an Apple Silicon Mac. - Run any
daggercommand so the engine is provisioned via thecontainerdriver. - The engine container starts, then crashes with the
install resolv.conf ... operation not permittederror 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
daggerv0.21.6 (engine imageregistry.dagger.io/engine:v0.21.6), darwin/arm64- Apple
containerv1.0.0 (broken); v0.4.1-49 (working)
Activity
fix(apple): grant all capabilities to engine container
fix(apple): grant all capabilities to engine container (#13460)
fix(apple): grant all capabilities to engine container (#13460)