Skip to content

build(dockerfile): use BuildKit secret for MASTER_PASSWORD#219

Closed
b23prodtm wants to merge 1 commit intofix/composefrom
chunk/buildkit-secret-master-password-1771185716586
Closed

build(dockerfile): use BuildKit secret for MASTER_PASSWORD#219
b23prodtm wants to merge 1 commit intofix/composefrom
chunk/buildkit-secret-master-password-1771185716586

Conversation

@b23prodtm
Copy link
Owner

No description provided.

### What changed
- Use Docker BuildKit secret mount for `master_password` in `Dockerfile.x86_64`.
- Read secret from `/run/secrets/master_password` into `MASTER_PASSWORD` during `RUN`.
- Pass `-p` to `./configure.sh` only when `MASTER_PASSWORD` is set using `${MASTER_PASSWORD:+-p "$MASTER_PASSWORD"}`.
- Keep database migration steps unchanged.

### Why
- Prevents leaking credentials into image layers, env, or build args.
- Allows builds to proceed without a password by omitting the `-p` flag when unset.

### Build notes
- Requires BuildKit: set `DOCKER_BUILDKIT=1`.
- Provide the secret at build time, e.g.:
  `docker build --secret id=master_password,src=./master_password.txt .`
@b23prodtm b23prodtm closed this Feb 16, 2026
@b23prodtm
Copy link
Owner Author

b23prodtm commented Feb 16, 2026

Added in #216 secrets

@b23prodtm b23prodtm deleted the chunk/buildkit-secret-master-password-1771185716586 branch February 17, 2026 00:33
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

Comments