Created
April 13, 2017 00:04
-
-
Save dmlyons/81056938fa2abccf5e74e9b21749a712 to your computer and use it in GitHub Desktop.
Arm Golang Dockerfile, https://hub.docker.com/r/dmlyons/golang-arm/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM armhf/alpine:latest | |
RUN apk add --no-cache ca-certificates | |
ENV GOLANG_VERSION 1.8.1 | |
ENV GOLANG_SRC_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz | |
ENV GOLANG_SRC_SHA256 33daf4c03f86120fdfdc66bddf6bfff4661c7ca11c5da473e537f4d69b470e57 | |
RUN set -ex \ | |
&& apk add --no-cache --virtual .build-deps \ | |
bash \ | |
gcc \ | |
musl-dev \ | |
openssl \ | |
go \ | |
\ | |
&& export GOROOT_BOOTSTRAP="$(go env GOROOT)" \ | |
\ | |
&& wget -q "$GOLANG_SRC_URL" -O golang.tar.gz \ | |
&& echo "$GOLANG_SRC_SHA256 golang.tar.gz" | sha256sum -c - \ | |
&& tar -C /usr/local -xzf golang.tar.gz \ | |
&& rm golang.tar.gz \ | |
&& cd /usr/local/go/src \ | |
&& ./make.bash \ | |
\ | |
&& rm -rf /*.patch \ | |
&& apk del .build-deps | |
ENV GOPATH /go | |
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH | |
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" | |
WORKDIR $GOPATH | |
RUN apk update | |
RUN apk add git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment