From a7b09fbefea27ea696c8eec0a6ff622ed4d2b787 Mon Sep 17 00:00:00 2001 From: Zachary Lowden Date: Sat, 5 Sep 2026 02:15:05 -0500 Subject: [PATCH] =?UTF-8?q?fix(dev):=20repair=20createbuckets=20=E2=80=94?= =?UTF-8?q?=20mc's=20config/policy=20commands=20were=20removed=20(#4646)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `createbuckets` service in docker-compose.base.yml has been failing on every local `docker compose up`, so the modelshare and images buckets are never created. It uses two mc subcommands that no longer exist: mc config host add -> mc alias set mc policy set -> mc anonymous set The image is unpinned (`minio/mc`), so this broke silently whenever upstream dropped them. On mc RELEASE.2025-08-13T08-35-41Z the container exits 1 with: mc: `config` is not a recognized command. Because the entrypoint is a single `&&` chain, the first failure aborts it and neither bucket is made. Nothing else in the stack reports a problem, so the failure is easy to miss until something tries to use object storage. Also add `--ignore-existing` to both `mc mb` calls. Without it the fix would only work once: `mc mb` on an existing bucket exits 1 ("you already own it"), which aborts the same `&&` chain, so the service would go back to failing on the second and every subsequent `docker compose up`. Verified against a running local MinIO: - before: container exits 1, `mc ls` shows no buckets - after: exits 0, both buckets created and set public - re-run: exits 0 again (idempotent) - control: `mc mb` on an existing bucket is rc=1 without the flag, rc=0 with it --- docker-compose.base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 7e1a2e7a8b..dbbe32230e 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -92,7 +92,7 @@ services: depends_on: - minio entrypoint: > - /bin/sh -c "/usr/bin/mc config host add minio http://minio:9000 minioadmin minioadmin && /usr/bin/mc mb minio/modelshare && /usr/bin/mc policy set public minio/modelshare && /usr/bin/mc mb minio/images && /usr/bin/mc policy set public minio/images && exit 0" + /bin/sh -c "/usr/bin/mc alias set minio http://minio:9000 minioadmin minioadmin && /usr/bin/mc mb --ignore-existing minio/modelshare && /usr/bin/mc anonymous set public minio/modelshare && /usr/bin/mc mb --ignore-existing minio/images && /usr/bin/mc anonymous set public minio/images && exit 0" maildev: image: maildev/maildev