fix: exclude .env files from the Docker build context
.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 <noreply@anthropic.com>
This commit is contained in:
1 parent
f37c19cc84
commit
f0c3b44778
1 file changed
+3
-1
+3
-1
@@ -4,4 +4,6 @@ node_modules
|
||||
npm-debug.log
|
||||
README.md
|
||||
.next
|
||||
.git
|
||||
.git
|
||||
.env
|
||||
.env.*.local
|
||||
Reference in new issue
Block a user