[BUG] docker compose build cannot grant network.host entitlement when using buildx bake
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, docker-compose, go
- 領域
- build-system
調査の方向性
Start by reproducing with the compose.yaml in the issue (a build with entitlements: [network.host]) and docker compose build, then find where Compose assembles the Buildx Bake invocation and whether it can pass --allow. The issue says the Bake config already includes the entitlement, so the gap is in the command arguments. Done means the build succeeds with the entitlement granted, and the maintainers have settled whether to add a flag or grant it automatically.
索引モデルが issue の本文から書いたものです。
説明
Description
When a Compose service declares the network.host build entitlement, docker compose build fails because Compose invokes Buildx Bake without passing --allow=network.host
This appears to be a compatibility issue with Buildx's entitlement validation when using --progress rawjson (https://github.com/docker/buildx/security/advisories/GHSA-gwr2-q96m-6682).
The Compose-generated Bake configuration correctly includes the requested entitlement, but the actual Bake invocation does not grant it. The docker compose build CLI does not expose an --allow option to resolve this.
Steps To Reproduce
- Create compose.yaml:
services: test: build: dockerfile_inline: "FROM alpine\nRUN --network=host true" entitlements: [network.host] - Run:
docker compose build
Compose Version
Docker Compose version v5.6.0
Docker Environment
Client: Docker Engine - Community
Version: 29.9.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.38.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v5.6.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 29
Server Version: 29.9.0
Storage Driver: overlayfs
driver-type: io.containerd.snapshotter.v1
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: b7a25261e029d68978bbf290df0a62fc819b3c51
runc version: v1.5.2-0-g29dd3dc2
init version: de40ad0
Security Options:
apparmor
Profile: default
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.11.0-29-generic
Operating System: Ubuntu 24.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 30.97GiB
Name: ubuntu
ID: d4182ace-77a6-4a65-98f3-2e4c558c561f
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
::1/128
Live Restore Enabled: false
Firewall Backend: iptables
EnableUserlandProxy: true
UserlandProxyPath: /usr/bin/docker-proxy
Anything else?
Actual behavior
The build fails with:
$ docker compose build
[+] Building 0.0s (1/1) FINISHED
=> [internal] load local bake definitions 0.0s
=> => reading from stdin 559B 0.0s
additional privileges requested: pass "--allow=network.host" to grant requested privileges
Expected behavior
docker compose build should provide a way to grant the requested build entitlement, or otherwise handle the required permission, so that the build can succeed.
Direct Buildx Bake works
The same build succeeds when invoking Buildx Bake directly and explicitly granting the requested entitlement.
- Create docker-bake.hcl
target "default" { dockerfile-inline = "FROM alpine\nRUN --network=host true" entitlements = ["network.host"] } - Run
docker buildx bake \ --file docker-bake.hcl \ --allow=network.host
- 主要言語
- Go
- スター
- 38.4k
- フォーク
- 5.9k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 70
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/compose のほかの issue
-
[BUG] <title>オープンkind/bug status/0-triage
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
メンテナーはふだん 1 日以内に返信
-
Epic: Move service selection into the backend API instead of pre-filtering the project in the CLIオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
メンテナーはふだん 1 日以内に返信
-
Watch: exec mode対応中かも @glours が 5 日前に担当しました。 オープンkind/feature
docker/compose#14326 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Restore build concurrency limit now that bake supports it対応中かも @maxproske が 1 日前に担当しました。 オープンkind/feature
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
[BUG] `start -p <name>` treats an optional (`required: false`) dependency as required再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 22/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
openclaw/wacli#503 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
apache/rocketmq-dashboard#6895 ·
メンテナーはふだん 3 日以内に返信
-
agent-butler-finding chore
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
jordansmall/spindrift#5466 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
open-telemetry/opentelemetry-go-compile-instrumentation#1507 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 87/100
777genius/agent-notifications#490 ·
メンテナーはふだん 1 日以内に返信