Matt Jeanneret | 3cc8446 | 2019-05-05 12:09:02 -0400 | [diff] [blame^] | 1 | FROM golang:1.10 |
Sergio Slobodrian | c2d86fb | 2017-07-18 20:35:46 -0400 | [diff] [blame] | 2 | MAINTAINER Alex Peters <info@alexanderpeters.de> |
| 3 | |
Gertjan Van Droogenbroeck | e0c9acb | 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 | c2d86fb | 2017-07-18 20:35:46 -0400 | [diff] [blame] | 5 | |
Gertjan Van Droogenbroeck | e0c9acb | 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 | c2d86fb | 2017-07-18 20:35:46 -0400 | [diff] [blame] | 8 | |
Gertjan Van Droogenbroeck | e0c9acb | 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 | c2d86fb | 2017-07-18 20:35:46 -0400 | [diff] [blame] | 10 | |
| 11 | RUN go get github.com/pwaller/goupx \ |
| 12 | && go get golang.org/x/tools/cmd/cover \ |
Matt Jeanneret | db9584d | 2018-10-12 15:01:48 -0400 | [diff] [blame] | 13 | && go get -u golang.org/x/lint/golint \ |
Sergio Slobodrian | c2d86fb | 2017-07-18 20:35:46 -0400 | [diff] [blame] | 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"] |