Skip to content

Docker: use RustFS client to create buckets - #338

Merged
stsewd merged 1 commit into
mainfrom
dev-rustfs-client
Oct 26, 2026
Merged

stsewd merged 1 commit into
mainfrom
dev-rustfs-client

Conversation

@stsewd

@stsewd stsewd commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

MinIO archived the mc client, and dl.min.io now returns 410 Gone. Our Dockerfiles download it without --fail, so /usr/bin/mc ends up being the error page. That means no buckets get created on init, collectstatic fails with NoSuchBucket, and everything under /static/ returns 403 locally.

This switches createbuckets.sh to rc, RustFS's own client, which has nearly the same commands. The Dockerfile changes that install rc are in:

Things to double-check:

  • Buckets now get download (anonymous read-only) instead of public. With public, anyone could upload files anonymously. Nginx only needs to read.
  • bucket create -p skips existing buckets, so re-running the script no longer prints errors.

🤖 Generated with Claude Code

MinIO archived mc and its downloads now return 410.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stsewd
stsewd marked this pull request as ready for review October 22, 2026 16:45
@stsewd
stsewd requested a review from a team as a code owner October 22, 2026 16:45
@stsewd
stsewd requested a review from humitos October 22, 2026 16:45
/usr/local/bin/rc bucket create -p myrustfs/media;
/usr/local/bin/rc bucket anonymous set download myrustfs/media;
/usr/local/bin/rc bucket create -p myrustfs/build-tools;
/usr/local/bin/rc bucket anonymous set download myrustfs/build-tools;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/usr/local/bin/rc bucket anonymous set download myrustfs/build-tools;
/usr/local/bin/rc bucket public set download myrustfs/build-tools;

We want to this to be public so we can upload tools downloaded from production S3 without recompiling them locally with something like readthedocs/readthedocs.org#13161

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This permission allows uploading using a password, that script uses a password, so it's safe.

@stsewd
stsewd merged commit c2d601b into main Oct 26, 2026
1 check passed
@stsewd
stsewd deleted the dev-rustfs-client branch October 26, 2026 19:41
stsewd added a commit to readthedocs/readthedocs.org that referenced this pull request Oct 26, 2026
MinIO archived the `mc` client, and `dl.min.io` now returns `410 Gone`.
The `curl` call had no `--fail`, so the image saved the error page as
`/usr/bin/mc`. Bucket creation on init silently failed, and `/static/`
returned 403 locally.

This installs `rc`, RustFS's own client, from its GitHub releases
instead. The download uses `--fail` and checks the release checksum, so
a dead URL now fails the image build instead of producing a broken
binary. It also selects the binary for the build architecture (amd64 or
arm64), where `mc` was hardcoded to amd64.

Needs readthedocs/common#338, which switches `createbuckets.sh` to `rc`.
The `common` submodule needs to be bumped once that is merged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants