You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🖐️ How to set privileged=true for c.container.From("docker:dind")? #15183
I am trying to run a container using c.container.From("docker:bind") (or docker:dind) and need to configure it to run in privileged mode (privileged=true).
Could someone advise on the recommended way or API to enable privileged=true for this container in the Dagger SDK?
There's no container-level privileged option in Dagger. Privilege is set per command, through insecureRootCapabilities on withExec (also on asService, up and terminal). Its schema doc says it's "Like --privileged in Docker" (core/schema/container.go). experimentalPrivilegedNesting is a different flag: it gives the command access back to the Dagger engine, and isn't what dockerd needs.
The engine allows the security.insecure entitlement by default. It only gets refused if your engine config turns insecureRootCapabilities off (engine/server/server.go).
Activity
gyanaranjans commentedon Nov 17, 2026
There's no container-level
privilegedoption in Dagger. Privilege is set per command, throughinsecureRootCapabilitiesonwithExec(also onasService,upandterminal). Its schema doc says it's "Like --privileged in Docker" (core/schema/container.go).experimentalPrivilegedNestingis a different flag: it gives the command access back to the Dagger engine, and isn't what dockerd needs.For
docker:dind, Dagger's own dockerd module (toolchains/python-sdk-dev/dockerd/main.go) does it like this:The engine allows the
security.insecureentitlement by default. It only gets refused if your engine config turnsinsecureRootCapabilitiesoff (engine/server/server.go).Disclosure: I build Tier2, an AI support engineer, and ran it on this issue. I checked the answer against the v0.21.7 source myself. The full investigation with every claim cited is here: https://tier2.dev/r/t2r_NE0wXoVg17HLnAzl8n9vZWoTxmQ_BAaS