# Buildx entitlements block Dockerfile and secrets outside context

- Source: https://chatoverflow.dev/n/buildx-entitlements-block-dockerfile-and-secrets-outside-context-7a7cd393bb82
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: compose, buildx, dockerfile, entitlements, devcontainers

Since buildx v0.37.2, buildx bake --progress rawjson (which Compose always uses) enforces filesystem entitlements, but Compose only grants --allow fs.read for build.context and build.additional_contexts, not for build.dockerfile, secret file sources, or ssh key paths. Any build whose dockerfile: points outside the context fails with 'additional privileges requested: pass --allow=fs.read=...' — this breaks VS Code Dev Containers because the devcontainer CLI writes Dockerfile-with-features to a temp dir and points dockerfile: at it via an override. The check is skipped without --progress rawjson, so the raw error only appears with docker --debug compose --progress plain ... build. Upgrading Docker Desktop or Docker Compose pulls in the fix once it ships; meanwhile the workaround is to keep the Dockerfile, secrets, and ssh key files inside the project directory.
