diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 3fef327262..7898c6220f 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -15,7 +15,7 @@ # the case. Therefore, you don't have to disable it anymore. # -FROM aarch64/ubuntu:wily +FROM aarch64/ubuntu:xenial # Packaged dependencies RUN apt-get update && apt-get install -y \ @@ -39,6 +39,7 @@ RUN apt-get update && apt-get install -y \ libcap-dev \ libltdl-dev \ libsystemd-dev \ + libyaml-dev \ mercurial \ net-tools \ parallel \ @@ -101,9 +102,20 @@ RUN mkdir /usr/src/go && curl -fsSL https://golang.org/dl/go${GO_VERSION}.src.ta && cd /usr/src/go/src \ && GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash -ENV PATH /usr/src/go/bin:$PATH +ENV PATH /go/bin:/usr/src/go/bin:$PATH ENV GOPATH /go +# Dependency for golint +ENV GO_TOOLS_COMMIT 823804e1ae08dbb14eb807afc7db9993bc9e3cc3 +RUN git clone https://github.com/golang/tools.git /go/src/golang.org/x/tools \ + && (cd /go/src/golang.org/x/tools && git checkout -q $GO_TOOLS_COMMIT) + +# Grab Go's lint tool +ENV GO_LINT_COMMIT 32a87160691b3c96046c0c678fe57c5bef761456 +RUN git clone https://github.com/golang/lint.git /go/src/github.com/golang/lint \ + && (cd /go/src/github.com/golang/lint && git checkout -q $GO_LINT_COMMIT) \ + && go install -v github.com/golang/lint/golint + # Only install one version of the registry, because old version which support # schema1 manifests is not working on ARM64, we should skip integration-cli # tests for schema1 manifests on ARM64. @@ -135,6 +147,15 @@ RUN git clone https://github.com/docker/docker-py.git /docker-py \ && git checkout -q $DOCKER_PY_COMMIT \ && pip install -r test-requirements.txt +# Install yamllint for validating swagger.yaml +RUN pip install yamllint==1.5.0 + +# Install go-swagger for validating swagger.yaml +ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb +RUN git clone https://github.com/go-swagger/go-swagger.git /go/src/github.com/go-swagger/go-swagger \ + && (cd /go/src/github.com/go-swagger/go-swagger && git checkout -q $GO_SWAGGER_COMMIT) \ + && go install -v github.com/go-swagger/go-swagger/cmd/swagger + # Set user.email so crosbymichael's in-container merge commits go smoothly RUN git config --global user.email 'docker-dummy@example.com' diff --git a/man/Dockerfile.aarch64 b/man/Dockerfile.aarch64 index e788eb1c1d..3edcb56725 100644 --- a/man/Dockerfile.aarch64 +++ b/man/Dockerfile.aarch64 @@ -1,6 +1,25 @@ FROM aarch64/ubuntu:xenial -RUN apt-get update && apt-get install -y git golang-go +# allow replacing httpredir or deb mirror +ARG APT_MIRROR=deb.debian.org +RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list + +RUN apt-get update && apt-get install -y \ + git \ + bash \ + curl \ + gcc \ + gccgo \ + make + +ENV GO_VERSION 1.7.5 +ENV GOARCH arm64 +ENV PATH /go/bin:/usr/src/go/bin:$PATH + +RUN mkdir /usr/src/go && \ + curl -fsSL https://golang.org/dl/go${GO_VERSION}.src.tar.gz | tar -v -C /usr/src/go -xz --strip-components=1 && \ + cd /usr/src/go/src && \ + GOOS=linux GOARCH=arm64 GOROOT_BOOTSTRAP="$(go env GOROOT)" ./make.bash RUN mkdir -p /go/src /go/bin /go/pkg ENV GOPATH=/go