Skip to content

chore(docker): keep local secrets out of build context - #45

Merged
stahnma merged 1 commit into
mainfrom
chore/dockerignore-secrets
Nov 21, 2026
Merged

stahnma merged 1 commit into
mainfrom
chore/dockerignore-secrets

Conversation

@stahnma

@stahnma stahnma commented Nov 21, 2026

Copy link
Copy Markdown
Member

The Dockerfile's build stage does COPY . ., and fly deploy uploads the working directory to Fly's remote builder as the build context. Local secret files that git ignores, like .env and fly.secrets (which holds Tigris credentials), weren't in .dockerignore, so they were sent to the builder and copied into the build stage.

The final image only copies in the built binary, so they didn't ship. But they shouldn't leave the machine at all.

This adds .env, fly.secrets and a stray scratch file f to .dockerignore, next to the existing local-scratch entries.

Already deployed on the fly branch (feed.stahnma.us) without issues.

@stahnma
stahnma merged commit c0dfe26 into main Nov 21, 2026
1 check passed
@stahnma
stahnma deleted the chore/dockerignore-secrets branch November 21, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant