Skip to content

Commit 1067510

Browse files
committed
🔒 fix: exclude .env from Docker build context
The builder stage runs COPY . . and Docker does not read .gitignore, so a real .env (this repo ships .env.example) lands in builder-stage layers in the local build cache. The final image is unaffected (multi-stage, binary-only), but cache layers are exportable and --target builder images would carry the secret. /certs was already excluded; .env now is too.
1 parent 684cd84 commit 1067510

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
/logs.txt
77
/*.log
88
/*.jsonl
9+
/.env
10+
/.env.*

0 commit comments

Comments
 (0)