Sergio Slobodrian | 6f5fc4c | 2017-11-17 15:31:12 -0500 | [diff] [blame] | 1 | FROM golang:1.9.2 |
Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 2 | MAINTAINER Alex Peters <info@alexanderpeters.de> |
| 3 | |
Gertjan Van Droogenbroeck | cb3507d | 2017-11-16 16:54:22 +0100 | [diff] [blame^] | 4 | RUN apt-get update && apt-get install -y apt-transport-https ca-certificates jq curl gnupg2 software-properties-common |
Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 5 | |
Gertjan Van Droogenbroeck | cb3507d | 2017-11-16 16:54:22 +0100 | [diff] [blame^] | 6 | RUN curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add - |
| 7 | RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" |
Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 8 | |
Gertjan Van Droogenbroeck | cb3507d | 2017-11-16 16:54:22 +0100 | [diff] [blame^] | 9 | RUN apt-get update && apt-cache policy docker-ce && apt-get install -y upx-ucl docker-ce && apt-get clean |
Sergio Slobodrian | be82927 | 2017-07-17 14:45:45 -0400 | [diff] [blame] | 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"] |