Skip to content

Instantly share code, notes, and snippets.

@binarytemple-external
Created April 18, 2017 15:18
Show Gist options
  • Save binarytemple-external/ac0c1c8e0dedccfd7cbfdc375df82c09 to your computer and use it in GitHub Desktop.
Save binarytemple-external/ac0c1c8e0dedccfd7cbfdc375df82c09 to your computer and use it in GitHub Desktop.
Dockerfile golang centos
FROM centos:latest
MAINTAINER docker@binarytemple.co.uk
ENV GOROOT /usr/local/go
#ENV GOROOT1_5 /usr/local/go1_5
#ENV GOBIN $GOROOT/bin
#ENV GOROOT_BOOTSTRAP $GOROOT
RUN yum update -y
RUN yum install -y gcc wget git which
ENV GOLANG_VERSION 1.8.1
ENV GOLANG_TAR_BALL go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_URL https://storage.googleapis.com/golang/$GOLANG_TAR_BALL
ENV GOLANG_DOWNLOAD_SHA1 a433f76c569055ff8536d796995518dd91a9fa5b
RUN wget $GOLANG_DOWNLOAD_URL \
&& echo "$GOLANG_DOWNLOAD_SHA1 $GOLANG_TAR_BALL" | sha1sum -c - \
&& tar -C /usr/local -xzf $GOLANG_TAR_BALL \
&& rm $GOLANG_TAR_BALL
#ENV GOPATH /go
ENV PATH $GOROOT/bin:$PATH
#RUN mkdir -p $GOROOT \
# && cd $GOROOT \
# && git clone https://github.com/golang/go.git . \
# && cd ./src \
# && CGO_ENABLED=1 ./make.bash
#
#WORKDIR $GOPATH
RUN go version
RUN gcc -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment