fix(minio): bake bootstrap.sh into image instead of bind-mounting (#506) #507
Reference in New Issue
Block a user
Delete Branch "fix/issue-506-bootstrap-bind-mount-dood"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes #506.
Under Docker-out-of-Docker (the production Gitea Actions runner), the host daemon resolves the relative bind-mount path
./infra/minio/bootstrap.sh:/bootstrap.sh:roagainst the host filesystem — not the runner container's/workspace/.... The script isn't there, so Docker creates an empty directory at/bootstrap.shand the entrypoint fails with/bootstrap.sh: Is a directory.This blocks the Compose Bucket Idempotency CI job (red on every PR since #499) and, more importantly, the actual staging / production deploys (they hit the same error when the
create-bucketsservice starts).Fix
Bake the script into a tiny derived image (
infra/minio/Dockerfile). No runtime path resolution. Works in DooD, regular Docker, and CI.docker-compose.prod.yml:create-buckets.image→create-buckets.build.context: ./infra/miniovolumes:bind-mount and the explicitentrypoint:(the Dockerfile sets it)RELEASE.2025-08-13T08-35-41Z) moves into the Dockerfile FROM lineVerified locally
docker compose -f docker-compose.prod.yml ... config --quietparsesdocker compose ... build create-bucketsbuilds the imagedocker run --rm --entrypoint /bin/sh <img> -c 'ls -l /bootstrap.sh && head -3 /bootstrap.sh'shows the script as a+xfile with the right contentTest plan after merge
Compose Bucket Idempotencyjob goes greennightly.ymlfor staging —create-bucketsruns cleanlymc admin user info myminio archiv-appon the running staging stack shows the bucket-scoped policy bound🤖 Generated with Claude Code