Browse code

use precompiled go from google, needs debian to work

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>

Andrew Hsu authored on 2017/02/07 04:29:25
Showing 1 changed files
... ...
@@ -1,9 +1,28 @@
1
-FROM    armhf/alpine:3.4
1
+FROM armhf/debian:jessie
2 2
 
3
-RUN     apk add -U git go bash curl gcc musl-dev make
3
+# allow replacing httpredir or deb mirror
4
+ARG APT_MIRROR=deb.debian.org
5
+RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list
6
+
7
+RUN apt-get update && apt-get install -y \
8
+  git \
9
+  bash \
10
+  curl \
11
+  gcc \
12
+  musl-dev \
13
+  make
14
+
15
+ENV GO_VERSION 1.7.5
16
+RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" \
17
+  | tar -xzC /usr/local
18
+ENV PATH /go/bin:/usr/local/go/bin:$PATH
19
+ENV GOPATH /go
20
+
21
+# We're building for armhf, which is ARMv7, so let's be explicit about that
22
+ENV GOARCH arm
23
+ENV GOARM 7
4 24
 
5 25
 RUN     mkdir -p /go/src /go/bin /go/pkg
6
-ENV     GOPATH=/go
7 26
 RUN     export GLIDE=v0.11.1; \
8 27
         export TARGET=/go/src/github.com/Masterminds; \
9 28
         mkdir -p ${TARGET} && \