From f0c3b44778b19c399ce83efff786c61c3d6d8d00 Mon Sep 17 00:00:00 2001 From: jonvdveen <196496658+jonvdveen@users.noreply.github.com> Date: Sun, 12 Jul 2026 09:46:19 -0600 Subject: [PATCH] fix: exclude .env files from the Docker build context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit .dockerignore did not list .env, so `docker build` copied any local .env — credentials included — into the image build context (and into the image wherever the Dockerfile does a broad `COPY . .`). Anyone building the image with a populated .env present would bake their secrets into the resulting image layers. Add `.env` and `.env.*.local` to .dockerignore so local environment files never enter the build context. Runtime configuration is still supplied the intended way — environment variables / an env_file at `docker run` / compose time — so nothing about normal deployment changes. Co-Authored-By: Claude Opus 4.8 --- .dockerignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 72e9aa4..999264e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,6 @@ node_modules npm-debug.log README.md .next -.git \ No newline at end of file +.git +.env +.env.*.local \ No newline at end of file