Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 1 | FROM golang:latest |
| 2 | MAINTAINER Alex Peters <info@alexanderpeters.de> |
| 3 | |
| 4 | RUN apt-get update && apt-get install -y apt-transport-https ca-certificates jq |
| 5 | |
| 6 | RUN echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list |
| 7 | RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
| 8 | |
| 9 | RUN apt-get update && apt-cache policy docker-engine && apt-get install -y upx-ucl docker-engine && apt-get clean |
| 10 | |
| 11 | RUN go get github.com/pwaller/goupx \ |
| 12 | && go get golang.org/x/tools/cmd/cover \ |
| 13 | && go get -u github.com/golang/lint/golint \ |
| 14 | && go get github.com/kisielk/errcheck \ |
| 15 | && go get github.com/cespare/prettybench \ |
| 16 | && go get github.com/uber/go-torch |
| 17 | |
| 18 | # Install dependency management tools |
| 19 | # gpm |
| 20 | RUN wget https://raw.githubusercontent.com/pote/gpm/v1.3.2/bin/gpm -O /usr/local/bin/gpm && \ |
| 21 | chmod +x /usr/local/bin/gpm |
| 22 | |
| 23 | # glide |
| 24 | ENV glide_version=v0.12.3 |
| 25 | RUN mkdir -p bin ; \ |
| 26 | curl -L https://github.com/Masterminds/glide/releases/download/${glide_version}/glide-${glide_version}-linux-amd64.tar.gz | \ |
| 27 | tar -xz -C bin ; \ |
| 28 | mv bin/linux-amd64/glide bin/glide; \ |
| 29 | rm -rf bin/linux-amd64 |
| 30 | |
| 31 | |
| 32 | ARG GITHUB_TOKEN |
| 33 | RUN echo "machine github.com login $GITHUB_TOKEN" >/root/.netrc |
| 34 | |
| 35 | COPY build_environment.sh / |
| 36 | COPY build.sh / |
| 37 | |
| 38 | VOLUME /src |
| 39 | WORKDIR /src |
| 40 | |
| 41 | ENV GORACE="halt_on_error=1" |
| 42 | |
| 43 | ENTRYPOINT ["/build.sh"] |