mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 19:42:17 +00:00
5571d4830b
The fixture lab's throwaway image hardcoded two Docker Hub base images, so on a network that cannot reach registry-1.docker.io the capture script fails at build time and no MinIO fixtures can be generated at all. That matters more than it looks: the interop reader tests are #[ignore]d precisely because the fixtures are gitignored and must be generated locally, so an unreachable registry silently keeps the whole MinIO SSE interop lane unverifiable. Both base images become build args with the current Docker Hub values as defaults, and the capture script forwards MINIO_LAB_MINIO_IMAGE / MINIO_LAB_PYTHON_IMAGE when set. CI keeps the defaults; a restricted network can point at quay.io (which publishes the MinIO releases) and public.ecr.aws (which mirrors the official Python images), both verified to produce a working lab image and real fixtures. The README documents the override and warns against an unpinned :latest MinIO tag, since the captured on-disk format is exactly what the interop tests assert against. Refs rustfs/backlog#1638.
27 lines
1.3 KiB
Docker
27 lines
1.3 KiB
Docker
# Throwaway image for generating real MinIO on-disk fixtures without installing
|
|
# a MinIO server on the host. Multi-stage: pull the official MinIO server binary
|
|
# from the published image (linux, no dl.min.io download), then drop it into a
|
|
# small Python image that runs the fixture lab (lab.py needs only python3 +
|
|
# openssl; it drives MinIO's S3 API directly, so no `mc` is required).
|
|
#
|
|
# The MinIO release is pinned so the captured fixture format is reproducible;
|
|
# this is the release the interop tests were validated against.
|
|
#
|
|
# 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_IMAGE}
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends openssl ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY --from=minio /usr/bin/minio /usr/local/bin/minio
|
|
RUN chmod +x /usr/local/bin/minio && /usr/local/bin/minio --version
|
|
WORKDIR /repo
|