From 7fd54a7a48f9f1bb2b28144e38c886d1fe813a04 Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Tue, 13 Mar 2018 03:18:09 +0000 Subject: [PATCH 1/2] Enable CRIU on non-amd64 architectures Since the recent release of CRIU has already supported other arches such as AArch64, ppc64le, and s390x, so we can enable it now. Signed-off-by: Dennis Chen --- Dockerfile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index c2e279505f..7c4a8608db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,9 +44,7 @@ FROM base AS criu # Install CRIU for checkpoint/restore support ENV CRIU_VERSION 3.6 # Install dependancy packages specific to criu -RUN case $(uname -m) in \ - x86_64) \ - apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y \ libnet-dev \ libprotobuf-c0-dev \ libprotobuf-dev \ @@ -59,13 +57,7 @@ RUN case $(uname -m) in \ && curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \ && cd /usr/src/criu \ && make \ - && make PREFIX=/opt/criu install-criu ;\ - ;; \ - armv7l|aarch64|ppc64le|s390x) \ - mkdir -p /opt/criu; \ - ;; \ - esac - + && make PREFIX=/opt/criu install-criu FROM base AS registry # Install two versions of the registry. The first is an older version that From 803a756941f5e4b68429a3642d52585c8ea6dbaa Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Fri, 23 Mar 2018 06:01:48 +0000 Subject: [PATCH 2/2] Remove the `uname -m` in Dockerfile Using `dpkg --print-architecture` instead of the `uname -m` to abstract the architecture value from the container images, which the build process is running inside, to match exactly the behavior specified by the following Docker file while not 'passthru' to the host. Signed-off-by: Dennis Chen --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c4a8608db..8bc546bd9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,8 +72,8 @@ RUN set -x \ && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ - && case $(uname -m) in \ - x86_64|ppc64le|s390x) \ + && case $(dpkg --print-architecture) in \ + amd64|ppc64*|s390x) \ (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \ GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \ go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \