use pre-compiled golang arm64 toolset

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 30c250b285e758b295e010eee64b726cdac0e7be
Component: packaging
This commit is contained in:
Andrew Hsu
2017-12-01 14:56:19 -08:00
parent 29875cbb85
commit 9b80ff5665
@@ -8,10 +8,7 @@ RUN apt-get update && apt-get install -y golang-go apparmor bash-completion btrf
# We don't use the official ARMv6 released binaries as a GOROOT_BOOTSTRAP, because
# not all ARM64 platforms support 32-bit mode. 32-bit mode is optional for ARMv8.
ENV GO_VERSION 1.9.2
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 curl -fSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" | tar xzC /usr/local
ENV GOPATH /go
ENV PATH /go/bin:/usr/src/go/bin:$PATH
ENV DOCKER_BUILDTAGS apparmor seccomp selinux