Repository navigation
fix: build compose images without host networking - #129
Draft
satriadhikara wants to merge 1 commit into
Draft
satriadhikara wants to merge 1 commit into
satriadhikara wants to merge 1 commit into
Conversation
build.network: host was set on 9 services but no Dockerfile needs host networking: every build step only fetches packages (Maven, pip/pipenv, apk, bun), which works on the default build network. The release compose file (.docker/docker-compose.yml) never used it. Since Compose 2.37.0 builds go through buildx bake, where network: host is an entitlement that must be granted with --allow=network.host, and Compose never passes it. Buildx < 0.37.2 skipped that check under --progress=rawjson, which hid the problem. Buildx 0.37.2 (GHSA-gwr2-q96m-6682) enforces it, so every docker compose build of these services fails on current GitHub runners and on any local setup with Buildx >= 0.37.2.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Remove
build.network: hostfrom the 9 services indocker-compose.ymlthat build from source. No Dockerfile needs host networking, and current Buildx refuses it under Compose's default build path. This makes theuianddocker-integration (test_integration_expire.sh)CI jobs fail on every PR, and breaksdocker compose buildlocally for anyone on Buildx >= 0.37.2.Failure
Both CI jobs stop right after
#1 [internal] load local bake definitionswith:Example: run 38134879446 on #117 (runner image ubuntu-24.04
20261004.327.1). The same jobs passed on #114's run 37577263223 (image20260927.320.1).Root cause
Bake treats
build.network: hostas a privileged entitlement that has to be granted with--allow=network.host. Compose builds throughbuildx bake --progress rawjsonand only passes--allowforfs.readandsecurity.insecure, nevernetwork.host. This is still true on Compose main (v5.6.0). So anydocker compose buildthat touches a service withnetwork: hostnow fails.Why it only started failing now
The config has needed this entitlement since mid-2025. A Buildx bug hid the error until the latest runner image fixed it:
network: hostadded to the build sections (97e179a, 1.4.0 release)network: hostnow needs--allow=network.host, which Compose never passes. Builds should fail but don't, because of the next row.--progress=rawjson--progress=rawjsonrejects ungranted entitlements20261004.327.1ships Buildx 0.37.2. Compose is unchanged at 2.38.2.The same failure will reach local builds once Docker Desktop or OrbStack bundles Buildx >= 0.37.2.
Why remove it rather than work around it
localhost,127.0.0.1,host.docker.internal, a proxy or a private registry. They only fetch packages (Maven, pip/pipenv, apk, bun), which works on the default build network..docker/docker-compose.yml(the release/install compose) never set it.COMPOSE_BAKE=falsein CI would also unblock CI. But it leaves local builds broken, and Compose v5 ignores it (it still went through bake when tested locally), so it would break again on the next runner image.Type of Change
Related Issue
Closes # (issue number)
Checklist
Additional Notes
Local verification (OrbStack, CI's exact toolchain)
I ran Compose 2.38.2 and Buildx 0.37.2 (
docker/compose-bin:v2.38.2,docker/buildx-bin:0.37.2) in a container against the local daemon:origin/main:docker compose build dbrepo-uifails with the same--allow=network.hosterror as CI.docker compose build dbrepo-uisucceeds.docker compose build, as inpublish-ghcr-images, builds all 9 images after the CI prep scripts. A separate--no-cachebuild with host Compose v5.1.2 also built all 9.uijob smoke test: thedbrepo-uicontainer ran andtest_heap.shcompleted, with 0 failed requests in 4×1000.test_integration_expire.sh: all 5 tests pass.up: these services came up healthy: auth, broker, cache-db, metadata-db, data-db, auth-db, dashboard-db, dashboard-ui, search-db, identity, storage, search-service, dashboard-service, ui, and metadata-service.storage-service-init,search-service-initanddashboard-service-initexited 0.Pre-existing issue found during e2e (not caused by this PR)
dbrepo-data-serviceanddbrepo-consumer-servicebuilt from current main crash at startup:With Spring logging disabled, data-service then fails with
NoSuchFieldError: ... AwsClientOption CREDENTIALS_IDENTITY_PROVIDER. That points to an AWS SDK version mix on the classpath. A data-service image built from the same context with--network hostcrashes identically, so this is independent of build networking. The gateway then fails on the missingdata-serviceupstream. I will raise it separately.Limits
network: hostback. They can set it in a localdocker-compose.override.yml. Please flag if a known setup relies on it.