diff --git a/.ai/lessons.md b/.ai/lessons.md index 826e1bb5a6..db826478c3 100644 --- a/.ai/lessons.md +++ b/.ai/lessons.md @@ -99,3 +99,4 @@ ## Trace image replacements through build stages - When replacing a container image for development, inspect both Compose services and every development Dockerfile `FROM` stage. - A successful Compose pull does not prove the application build is free of the old image; validate the complete build dependency chain. +- Do not replace a removed image with a floating `latest` tag. Find the newest stable release tag and pin it consistently in Compose and every Dockerfile stage. diff --git a/docker-compose-maxio.dev.yml b/docker-compose-maxio.dev.yml index 19bc9e6a20..b429244166 100644 --- a/docker-compose-maxio.dev.yml +++ b/docker-compose-maxio.dev.yml @@ -162,7 +162,7 @@ services: networks: - coolify # maxio-init: - # image: quay.io/minio/aistor/mc:latest + # image: quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z # pull_policy: always # container_name: coolify-maxio-init # restart: no @@ -182,7 +182,7 @@ services: # networks: # - coolify minio-init: - image: quay.io/minio/aistor/mc:latest + image: quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z pull_policy: always container_name: coolify-minio-init restart: no diff --git a/docker-compose.dev-multi.yml b/docker-compose.dev-multi.yml index 8ddcfc8f92..31908436f4 100644 --- a/docker-compose.dev-multi.yml +++ b/docker-compose.dev-multi.yml @@ -195,7 +195,7 @@ services: minio-init: profiles: ["minio"] - image: quay.io/minio/aistor/mc:latest + image: quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z pull_policy: always restart: "no" depends_on: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 276912717d..869a059c94 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -150,7 +150,7 @@ services: networks: - coolify minio-init: - image: quay.io/minio/aistor/mc:latest + image: quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z pull_policy: always container_name: coolify-minio-init restart: no diff --git a/docker/coolify-helper/Dockerfile b/docker/coolify-helper/Dockerfile index 94330bbcec..1fe99f01c2 100644 --- a/docker/coolify-helper/Dockerfile +++ b/docker/coolify-helper/Dockerfile @@ -15,11 +15,7 @@ ARG NIXPACKS_VERSION=1.41.0 ARG RAILPACK_VERSION=0.23.0 # https://github.com/jdx/mise/releases — must match railpack's pinned version (https://raw.githubusercontent.com/railwayapp/railpack/refs/heads/main/core/mise/version.txt) ARG MISE_VERSION=2026.3.17 -# https://github.com/minio/mc/releases -ARG MINIO_VERSION=RELEASE.2025-08-13T08-35-41Z - - -FROM minio/mc:${MINIO_VERSION} AS minio-client +FROM quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z AS minio-client FROM ${BASE_IMAGE} AS base diff --git a/docker/development/Dockerfile b/docker/development/Dockerfile index ee9105ee02..e0df74b220 100644 --- a/docker/development/Dockerfile +++ b/docker/development/Dockerfile @@ -12,7 +12,7 @@ ARG NGINX_VERSION=1.31.2-r1 # ================================================================= # Get MinIO client # ================================================================= -FROM quay.io/minio/aistor/mc:latest AS minio-client +FROM quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z AS minio-client # ================================================================= # Final Stage: Production image diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile index 30d4a55e72..540602eceb 100644 --- a/docker/production/Dockerfile +++ b/docker/production/Dockerfile @@ -1,8 +1,6 @@ # Versions # https://hub.docker.com/r/serversideup/php/tags?name=8.4-fpm-nginx-alpine ARG SERVERSIDEUP_PHP_VERSION=8.4-fpm-nginx-alpine -# https://github.com/minio/mc/releases -ARG MINIO_VERSION=RELEASE.2025-08-13T08-35-41Z # https://github.com/cloudflare/cloudflared/releases ARG CLOUDFLARED_VERSION=2026.7.3 # https://www.postgresql.org/support/versioning/ @@ -63,7 +61,7 @@ RUN npm run build # ================================================================= # Stage 3: Get MinIO client # ================================================================= -FROM minio/mc:${MINIO_VERSION} AS minio-client +FROM quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z AS minio-client # ================================================================= # Final Stage: Production image diff --git a/tests/Unit/MinioClientPackagingTest.php b/tests/Unit/MinioClientPackagingTest.php index d4c46e7fbe..d5e029601b 100644 --- a/tests/Unit/MinioClientPackagingTest.php +++ b/tests/Unit/MinioClientPackagingTest.php @@ -1,20 +1,21 @@ map(function (string $dockerfile): string { - $contents = file_get_contents($dockerfile); + foreach ($imageFiles as $imageFile) { + $contents = file_get_contents($imageFile); - expect(preg_match('/^ARG MINIO_VERSION=(.+)$/m', $contents, $matches))->toBe(1); - - return $matches[1]; - }); - - expect($versions->unique()->values()->all()) - ->toBe(['RELEASE.2025-08-13T08-35-41Z']); + expect($contents) + ->toContain('quay.io/minio/aistor/mc:RELEASE.2026-09-06T02-44-40Z') + ->not->toContain('quay.io/minio/aistor/mc:latest') + ->not->toContain('minio/mc:'); + } });