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