You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.dockerignore excludes everything (*) and then re-includes pro_tes/ as a whole (!pro_tes/). A local pro_tes/.env (or a key file such as pro_tes/*.pem) is therefore sent to the build and lands in the layer of COPY pro_tes /tmp/src/pro_tes (Dockerfile). The later rm -rf /tmp/src does not remove it from that layer, so it ships with the image. This breaks the org rule that build contexts exclude .env* (except .env.example) and other secret files. Unchanged since v0.3.0; found by the pre-release review of 0.4.0.
Proposed fix
Append to .dockerignore, after the re-includes:
**/.env*
!**/.env.example
**/*.pem
**/*.key
and add a test that keeps these patterns in place.
Acceptance criteria
.env* files (except .env.example), *.pem and *.key files anywhere in the build context, also under pro_tes/, are excluded.
A test fails if the patterns are removed or a later re-include overrides them.
Activity