Skip to content

ci: add .dockerignore (keep docs/agent/VCS files out of the SPA build)#136

Merged
bnsoni merged 1 commit into
mainfrom
ci/add-dockerignore
Jun 17, 2026
Merged

ci: add .dockerignore (keep docs/agent/VCS files out of the SPA build)#136
bnsoni merged 1 commit into
mainfrom
ci/add-dockerignore

Conversation

@bnsoni

@bnsoni bnsoni commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What

Adds a .dockerignore (neither repo had one) so the SPA Docker build excludes files it does not need.

Why

The builder runs COPY . . and Next.js (output: 'standalone') file-tracing walks the whole project and follows symlinks. A dangling doc symlink (CLAUDE.md → "AGENTS.md\n", a stray newline — fixed separately) crashed next build:

[Error: ENOENT: no such file or directory, stat '/app/CLAUDE.md']

Keeping docs/agent/VCS files out of the build context removes that whole class of foot-gun (any future dangling doc symlink can no longer reach the build) and shrinks the context/image.

Excluded (verified not needed by the build)

CLAUDE.md, AGENTS.md, .claude/, .github/, docs/, root *.md, editor dirs, node_modules, .next, .git.

Verified nothing in next.config or app source reads these; the runner image only copies .next output + public/ + server-wrapper.js/entrypoint.sh, none of which are excluded. Excluding node_modules is also protective — it stops a local node_modules from overwriting the freshly-installed one during COPY . ..

🤖 Generated with Claude Code

The builder does `COPY . .` and Next.js standalone file-tracing walks the
project and follows symlinks. A dangling doc symlink (CLAUDE.md, fixed
separately) crashed `next build` with ENOENT. Excluding files the build
doesn't need (CLAUDE.md/AGENTS.md/docs/.claude/.github/*.md, node_modules,
.next, .git) removes that whole class of foot-gun and shrinks the context.

Verified nothing in next.config or src reads the excluded paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bnsoni bnsoni requested a review from mamigot as a code owner June 17, 2026 15:48
@mamigot

mamigot commented Jun 17, 2026

Copy link
Copy Markdown
Member

Claude finished @bnsoni's task —— View job


E2E Coverage Review

  • Gather context
  • Dismiss stale reviews (none found)
  • Check changed files — only .dockerignore added
  • Run mechanical coverage check — no new routes, no regression possible
  • Post review decision

✅ E2E Coverage — No Issues

No new app routes were introduced (page.tsx files unchanged). The only change is a .dockerignore file — a pure CI/infrastructure change. All existing coverage is intact.

Note: gh pr review requires additional tool permissions. The review decision above serves as the coverage bot's assessment.

@bnsoni bnsoni merged commit 5163647 into main Jun 17, 2026
3 of 4 checks passed
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.

2 participants