use precompiled go from google, needs debian to work

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
This commit is contained in:
Andrew Hsu 2017-02-06 11:29:25 -08:00 committed by Tibor Vass
parent 6d4b51d1a9
commit a39f753e56
1 changed files with 22 additions and 3 deletions

View File

@ -1,9 +1,28 @@
FROM armhf/alpine:3.4
FROM armhf/debian:jessie
RUN apk add -U git go bash curl gcc musl-dev make
# 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 \
musl-dev \
make
ENV GO_VERSION 1.7.5
RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" \
| tar -xzC /usr/local
ENV PATH /go/bin:/usr/local/go/bin:$PATH
ENV GOPATH /go
# We're building for armhf, which is ARMv7, so let's be explicit about that
ENV GOARCH arm
ENV GOARM 7
RUN mkdir -p /go/src /go/bin /go/pkg
ENV GOPATH=/go
RUN export GLIDE=v0.11.1; \
export TARGET=/go/src/github.com/Masterminds; \
mkdir -p ${TARGET} && \