fix(bindings): bindings/main missing from the Docker build context - #309
Merged
Merged
Conversation
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.
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.
Summary
While watching the
v5.5.0release run,Build Native (Linux & Windows)failed with:Root cause:
bindings/Dockerfile.build's finalCOPY --chown=sop:sop . .is filtered by the repo-root.dockerignore, which excludesbindings/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 ofbindings/) never made it into the image.Confirmed pre-existing:
v5.4.0'srelease.ymlrun 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 theCreate Releasestep, 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.buildtarget instead of the root one. It's the root file's exclusions minus thebindings/line.Test plan
DOCKER_BUILDKIT=1 docker build -t sop-bindings-builder-test -f bindings/Dockerfile.build .- succeedsdocker run --rm sop-bindings-builder-test ls bindings/main/-bindings/main/build.shand its Go sources are now present