Skip to content

Add .dockerignore allowlist for the build context - #4

Merged
ngpayyappilly merged 2 commits into
mainfrom
claude/dockerignore
Nov 19, 2026
Merged

ngpayyappilly merged 2 commits into
mainfrom
claude/dockerignore

Conversation

@ngpayyappilly

Copy link
Copy Markdown
Owner

Summary

The Dockerfile only COPYs motd.txt and bashrc, but with no .dockerignore the whole repo (including .git) is sent to the builder. This adds an allowlist (* then !motd.txt, !bashrc), so new files are excluded by default.

Notes

  • No functional change to the image.
  • Merge-order dependency: PR Fix bashrc interactive guard, bake kubectl completion, load for any HOME #3 (shell fixes) keeps COPY bashrc and COPY motd.txt, so the allowlist stays valid with or without it. If a later PR adds a new COPY source, it must also be added to the allowlist.
  • Not built locally (no Docker daemon in my environment). I checked that exactly bashrc, motd.txt and .dockerignore pass the allowlist.

Part of an SRE review series (hygiene).


Generated by Claude Code

claude and others added 2 commits November 12, 2026 22:00
The Dockerfile only COPYs motd.txt and bashrc, but without a
.dockerignore the whole repo (including .git) is sent to the builder.
Use an allowlist so new files are excluded by default.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014iDTyB5N8EdZyyZo4ymUVR
@ngpayyappilly
ngpayyappilly merged commit 427da23 into main Nov 19, 2026
2 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