Building the old version of the registry is not supported
on arm64, but building on armhf is possible.
Before using a multi-arch Dockerfile, the registry was
built on armhf as well, but this got lost in the transition
in commit f1701a741d77a92d28138944193e23aabfc74abe.
This commit re-enables building the old registry on armhf.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
... | ... |
@@ -37,10 +37,12 @@ RUN mkdir -p /usr/src/criu \ |
37 | 37 |
&& make PREFIX=/build/ install-criu |
38 | 38 |
|
39 | 39 |
FROM base AS registry |
40 |
-# Install two versions of the registry. The first is an older version that |
|
41 |
-# only supports schema1 manifests. The second is a newer version that supports |
|
42 |
-# both. This allows integration-cli tests to cover push/pull with both schema1 |
|
43 |
-# and schema2 manifests. |
|
40 |
+# Install two versions of the registry. The first one is a recent version that |
|
41 |
+# supports both schema 1 and 2 manifests. The second one is an older version that |
|
42 |
+# only supports schema1 manifests. This allows integration-cli tests to cover |
|
43 |
+# push/pull with both schema1 and schema2 manifests. |
|
44 |
+# The old version of the registry is not working on arm64, so installation is |
|
45 |
+# skipped on that architecture. |
|
44 | 46 |
ENV REGISTRY_COMMIT_SCHEMA1 ec87e9b6971d831f0eff752ddb54fb64693e51cd |
45 | 47 |
ENV REGISTRY_COMMIT 47a064d4195a9b56133891bbb13620c3ac83a827 |
46 | 48 |
RUN --mount=type=cache,target=/root/.cache/go-build \ |
... | ... |
@@ -52,7 +54,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ |
52 | 52 |
&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ |
53 | 53 |
go build -buildmode=pie -o /build/registry-v2 github.com/docker/distribution/cmd/registry \ |
54 | 54 |
&& case $(dpkg --print-architecture) in \ |
55 |
- amd64|ppc64*|s390x) \ |
|
55 |
+ amd64|armhf|ppc64*|s390x) \ |
|
56 | 56 |
(cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \ |
57 | 57 |
GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \ |
58 | 58 |
go build -buildmode=pie -o /build/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \ |