blob: 0b6648cc9421eec904058fb8f8495180e6095591 [file] [log] [blame]
Sergio Slobodrian6f5fc4c2017-11-17 15:31:12 -05001FROM golang:1.9.2
Sergio Slobodrianc2d86fb2017-07-18 20:35:46 -04002MAINTAINER Alex Peters <info@alexanderpeters.de>
3
Gertjan Van Droogenbroecke0c9acb2017-11-16 16:54:22 +01004RUN apt-get update && apt-get install -y apt-transport-https ca-certificates jq curl gnupg2 software-properties-common
Sergio Slobodrianc2d86fb2017-07-18 20:35:46 -04005
Gertjan Van Droogenbroecke0c9acb2017-11-16 16:54:22 +01006RUN curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -
7RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
Sergio Slobodrianc2d86fb2017-07-18 20:35:46 -04008
Gertjan Van Droogenbroecke0c9acb2017-11-16 16:54:22 +01009RUN apt-get update && apt-cache policy docker-ce && apt-get install -y upx-ucl docker-ce && apt-get clean
Sergio Slobodrianc2d86fb2017-07-18 20:35:46 -040010
11RUN 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
20RUN 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
24ENV glide_version=v0.12.3
25RUN 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
32ARG GITHUB_TOKEN
33RUN echo "machine github.com login $GITHUB_TOKEN" >/root/.netrc
34
35COPY build_environment.sh /
36COPY build.sh /
37
38VOLUME /src
39WORKDIR /src
40
41ENV GORACE="halt_on_error=1"
42
43ENTRYPOINT ["/build.sh"]