fix(ci): stage native binary in build-output/ to bypass .dockerignore
CI / Build Native (push) Failing after 8m52s

The .dockerignore has 'target' which excludes the target/
directory from the docker build context. The Dockerfile was
COPYing the binary from target/, so docker build failed with
'file not found in build context or excluded by .dockerignore'.

Fix: copy the binary to build-output/ (a non-excluded path)
before docker build, and update the Dockerfile to copy from
build-output/.

- Add 'Stage binary for Docker' step that does:
    mkdir -p build-output
    cp target/shot-crafter-calculator-1.0.0-runner build-output/
- Dockerfile COPY now reads build-output/shot-crafter-calculator-1.0.0-runner
- build-output/ is not in .dockerignore -> only the binary
  (~117MB) ships in the build context, not the whole target/
  tree (~200MB with classes, generated-sources, node binaries, etc.)
This commit is contained in:
2026-08-12 19:44:14 -04:00
parent 888c3b95ee
commit d067110103
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -66,6 +66,11 @@ jobs:
run: |
ls -la target/shot-crafter-calculator-1.0.0-runner
- name: Stage binary for Docker
run: |
mkdir -p build-output
cp target/shot-crafter-calculator-1.0.0-runner build-output/
- name: Build & Push Docker image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |