fix(devcontainer): Dockerfile build fails when .dockerignore excludes .git/ #1234

Merged
brent.edwards merged 1 commits from bugfix/m3-dockerfile-git-clean into master 2026-03-31 21:14:46 +00:00

1 Commits

Author SHA1 Message Date
brent.edwards ef29ca13ec fix(devcontainer): Dockerfile build fails when .dockerignore excludes .git/
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 32s
CI / build (pull_request) Successful in 36s
CI / quality (pull_request) Successful in 45s
CI / security (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 4m0s
CI / integration_tests (pull_request) Successful in 4m5s
CI / unit_tests (pull_request) Successful in 4m11s
CI / e2e_tests (pull_request) Successful in 19m23s
CI / lint (pull_request) Successful in 25m59s
CI / docker (pull_request) Successful in 18s
CI / coverage (pull_request) Successful in 12m33s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (pull_request) Successful in 55m25s
.dockerignore excludes .git/, so COPY . $APP_DIR never copies the .git
directory into the image. The RUN step at line 231 ran git clean -xdf
unconditionally, which requires a git repository — failing with
'fatal: not a git repository'.

Wrap git clean and rm -rf .git in a conditional that checks for .git
directory existence first, falling through silently when absent.

ISSUES CLOSED: #1233
2026-03-31 12:26:14 -07:00