Skip to content

fix(bindings): bindings/main missing from the Docker build context - #309

Merged
gerardrecinto merged 1 commit into
masterfrom
fix/bindings-docker-build-missing-context
Sep 10, 2026
Merged

gerardrecinto merged 1 commit into
masterfrom
fix/bindings-docker-build-missing-context

Conversation

@gerardrecinto

Copy link
Copy Markdown
Collaborator

Summary

While watching the v5.5.0 release run, Build Native (Linux & Windows) failed with:

/bin/bash: line 1: cd: bindings/main: No such file or directory

Root cause: bindings/Dockerfile.build's final COPY --chown=sop:sop . . is filtered by the repo-root .dockerignore, which excludes bindings/ entirely - correct for the main app image (Dockerfile), which has no business bundling foreign-language binding source, but wrong for this Dockerfile, whose entire job is building those bindings. bindings/main (and the rest of bindings/) never made it into the image.

Confirmed pre-existing: v5.4.0's release.yml run failed the identical way, so this isn't a regression from anything in this branch - it's a standing bug that's been silently breaking the native binary build (and therefore the Create Release step, which needs those artifacts) on every tagged release.

Fix

Added bindings/Dockerfile.build.dockerignore, a sidecar ignore file that BuildKit picks up automatically for this specific -f bindings/Dockerfile.build target instead of the root one. It's the root file's exclusions minus the bindings/ line.

Test plan

  • DOCKER_BUILDKIT=1 docker build -t sop-bindings-builder-test -f bindings/Dockerfile.build . - succeeds
  • docker run --rm sop-bindings-builder-test ls bindings/main/ - bindings/main/build.sh and its Go sources are now present
  • CI: ci.yml / go.yml / security.yml / codeql.yml / e2e.yml

bindings/Dockerfile.build's final COPY . . was silently dropping the
entire bindings/ directory - the root .dockerignore excludes bindings/
(correct for the main app image, which has no business bundling
foreign-language binding source), but this Dockerfile's whole job is
building those bindings. bindings/main never made it into the image,
so build_in_docker.sh's `cd bindings/main && ./build.sh` failed with
"No such file or directory", breaking the native binary build
(and therefore the GitHub Release step, which needs its artifacts) on
every tagged release. Confirmed pre-existing: v5.4.0's release.yml run
failed the identical way.

Added bindings/Dockerfile.build.dockerignore, a sidecar ignore file
BuildKit picks up for this specific -f target instead of the root one.
It mirrors the root file's exclusions minus the bindings/ line.
Verified locally: bindings/main now lands in the built image.
@gerardrecinto
gerardrecinto merged commit 4fc512d into master Sep 10, 2026
19 checks passed
@gerardrecinto
gerardrecinto deleted the fix/bindings-docker-build-missing-context branch September 10, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant