From 78828f9b5810a4693e64aa7473577f19fd6db0ee Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Thu, 24 Aug 2023 14:48:19 +0200 Subject: [PATCH] test/integration: Download the registry binary We used to have to clone and build the registry v2 but now that we have updated the version we can directtly copy the binary from the official distribution/distribution image. Signed-off-by: Djordje Lukic --- Dockerfile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8dcd74d466..89fdf0c8ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,12 @@ ARG SYSTEMD="false" ARG DEBIAN_FRONTEND=noninteractive ARG DOCKER_STATIC=1 +# REGISTRY_VERSION specifies the version of the registry to download from +# https://hub.docker.com/r/distribution/distribution. This version of +# the registry is used to test schema 2 manifests. Generally, the version +# specified here should match a current release. +ARG REGISTRY_VERSION=2.8.2 + # cross compilation helper FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx @@ -56,11 +62,7 @@ RUN git init . && git remote add origin "https://github.com/distribution/distrib FROM base AS registry WORKDIR /go/src/github.com/docker/distribution -# REGISTRY_VERSION specifies the version of the registry to build and install -# from the https://github.com/docker/distribution repository. This version of -# the registry is used to test both schema 1 and schema 2 manifests. Generally, -# the version specified here should match a current release. -ARG REGISTRY_VERSION=v2.8.2 + # REGISTRY_VERSION_SCHEMA1 specifies the version of the registry to build and # install from the https://github.com/docker/distribution repository. This is # an older (pre v2.3.0) version of the registry that only supports schema1 @@ -73,11 +75,10 @@ RUN --mount=from=registry-src,src=/usr/src/registry,rw \ --mount=type=cache,target=/go/pkg/mod \ --mount=type=tmpfs,target=/go/src <