From 45d6e9be446bbc09f53a3048f74058d76ffed8ce Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 1 Feb 2026 22:45:14 +0000 Subject: [PATCH] Fix Dockerfile shell operator precedence bug causing build failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The e2e test command had incorrect operator precedence: npm run test:e2e || echo "..." && touch marker This was parsed as: npm run test:e2e || (echo "..." && touch marker) Which meant: - If e2e tests PASS → touch never runs → marker file missing → build fails ❌ - If e2e tests FAIL → touch runs → marker file exists → build succeeds ✓ This was backwards\! The production stage expects the marker file at line 64: COPY --from=e2e-test /app/.e2e-tests-passed /tmp/.e2e-tests-passed Fixed by adding parentheses to ensure correct precedence: (npm run test:e2e || echo "...") && touch marker Now the marker file is always created regardless of test outcome, which is the intended behavior for a non-blocking test stage. This fixes the docker-build-test CI failures that occurred after the e2e tests started passing. The build was failing because tests were passing but the marker file wasn't being created. https://claude.ai/code/session_7d4f1b7d-7a0d-44db-b437-c76b6b61dfb2 --- frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 30f6886..4cccd0c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -52,7 +52,7 @@ COPY . . RUN npm run build # Run e2e tests (non-blocking in CI as requires running backend) -RUN npm run test:e2e || echo "E2E tests skipped (requires running services)" && touch /app/.e2e-tests-passed +RUN (npm run test:e2e || echo "E2E tests skipped (requires running services)") && touch /app/.e2e-tests-passed # Production stage FROM node:20-slim AS production