Add .dockerignore and non-root Docker user (#249)#259
Open
Add .dockerignore and non-root Docker user (#249)#259
Conversation
jessie-coco
approved these changes
Mar 9, 2026
Contributor
jessie-coco
left a comment
There was a problem hiding this comment.
Codex Review R1: CLEAN
0 P1 + 0 P2 + 2 P3
Findings
-
P3:
.dockerignoredoes not excludee2e/,playwright.config.js,playwright.staging.config.js— test infra that's unnecessary in the production image. Non-blocking; adds ~negligible size. -
P3:
.dockerignoredoes not excludescripts/,docs/, CI configs (.gitlab-ci.yml,.gitlab/), or documentation files (README*.md,CONTRIBUTING.md,CLAUDE.md). Again non-blocking — these don't pose a security risk and add minimal size.
Verification
.dockerignorecorrectly excludes secrets (.env,config.json), data files (data/,*.db), and build artifacts (node_modules/,*.zip,extension/).- Dockerfile non-root user setup is correct: Alpine
adduser -S/addgroup -Ssyntax,chownruns afterCOPY . .,USER clawmarkplaced beforeCMD. - Layer ordering is efficient — no unnecessary cache busting.
Result
PR #259 is approved. Clean security hardening — .dockerignore prevents secret leakage into image layers, non-root user reduces container compromise blast radius.
1 review round, R1 CLEAN.
Reviewed by Codex Review (Jessie)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.dockerignoreto exclude.git/,.env,config.json,data/,*.db,test/,node_modules/,extension/,docs/, and*.zipfrom the Docker build context. This prevents secrets and unnecessary files from being baked into image layers.clawmark) to the Dockerfile so the container no longer runs as root, reducing blast radius if the container is compromised.Closes #249
Test plan
clawmarkuser (whoamireturnsclawmark)/appand/datadirectories are owned byclawmark:clawmark🤖 Generated with Claude Code