diff --git a/crates/rio-v2/tests/minio_fixture_lab/Dockerfile b/crates/rio-v2/tests/minio_fixture_lab/Dockerfile index 8e6e50069..98c02c829 100644 --- a/crates/rio-v2/tests/minio_fixture_lab/Dockerfile +++ b/crates/rio-v2/tests/minio_fixture_lab/Dockerfile @@ -6,9 +6,18 @@ # # The MinIO release is pinned so the captured fixture format is reproducible; # this is the release the interop tests were validated against. -FROM minio/minio:RELEASE.2025-09-07T16-13-09Z AS minio +# +# Both base images are build args so a network that cannot reach Docker Hub can +# point them at a mirror carrying the same content — quay.io publishes the MinIO +# releases, and public.ecr.aws mirrors the official Python images. CI keeps the +# Docker Hub defaults. Override with: +# --build-arg MINIO_IMAGE=quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z \ +# --build-arg PYTHON_IMAGE=public.ecr.aws/docker/library/python:3.12-slim +ARG MINIO_IMAGE=minio/minio:RELEASE.2025-09-07T16-13-09Z +ARG PYTHON_IMAGE=python:3.12-slim +FROM ${MINIO_IMAGE} AS minio -FROM python:3.12-slim +FROM ${PYTHON_IMAGE} RUN apt-get update \ && apt-get install -y --no-install-recommends openssl ca-certificates \ && rm -rf /var/lib/apt/lists/* diff --git a/crates/rio-v2/tests/minio_fixture_lab/README.md b/crates/rio-v2/tests/minio_fixture_lab/README.md index 81ae85ef6..a003bab26 100644 --- a/crates/rio-v2/tests/minio_fixture_lab/README.md +++ b/crates/rio-v2/tests/minio_fixture_lab/README.md @@ -22,6 +22,18 @@ Use the automated path when you want the lab to: - upload a predefined SSE fixture case - export the generated backend tree into the lab layout +## Networks without Docker Hub access + +`capture_via_docker.sh` pulls its two base images from Docker Hub by default. Where that registry is unreachable, point the build at mirrors carrying the same content — quay.io publishes the MinIO releases and public.ecr.aws mirrors the official Python images: + +```bash +MINIO_LAB_MINIO_IMAGE=quay.io/minio/minio:RELEASE.2025-09-07T16-13-09Z \ +MINIO_LAB_PYTHON_IMAGE=public.ecr.aws/docker/library/python:3.12-slim \ +./capture_via_docker.sh +``` + +Pin the MinIO tag to the same release the Dockerfile names; an unpinned `:latest` captures whatever format that day's build writes, which is not what the interop tests were validated against. + ## Layout The default root is `artifacts/minio-fixture-lab`, which is already ignored by the repository. diff --git a/crates/rio-v2/tests/minio_fixture_lab/capture_via_docker.sh b/crates/rio-v2/tests/minio_fixture_lab/capture_via_docker.sh index 77f6e4687..6c1bec2f1 100755 --- a/crates/rio-v2/tests/minio_fixture_lab/capture_via_docker.sh +++ b/crates/rio-v2/tests/minio_fixture_lab/capture_via_docker.sh @@ -34,8 +34,19 @@ if [ "${cases[0]}" != "all" ]; then done fi +# Base images are overridable so a network without Docker Hub access can point +# them at a mirror (see the Dockerfile header). Unset by default, which keeps the +# Dockerfile's Docker Hub defaults for CI. +build_args=() +if [ -n "${MINIO_LAB_MINIO_IMAGE:-}" ]; then + build_args+=(--build-arg "MINIO_IMAGE=${MINIO_LAB_MINIO_IMAGE}") +fi +if [ -n "${MINIO_LAB_PYTHON_IMAGE:-}" ]; then + build_args+=(--build-arg "PYTHON_IMAGE=${MINIO_LAB_PYTHON_IMAGE}") +fi + echo ">> building ${IMAGE}" -docker build -f "${SCRIPT_DIR}/Dockerfile" -t "${IMAGE}" "${SCRIPT_DIR}" +docker build -f "${SCRIPT_DIR}/Dockerfile" -t "${IMAGE}" "${build_args[@]}" "${SCRIPT_DIR}" echo ">> capturing fixtures into ${FIXTURE_REL}" docker run --rm -v "${REPO_ROOT}:/repo" "${IMAGE}" \