blob: 47765fe298fbefdd4a3d7c4e2aaa71bdbe5716ac [file] [log] [blame]
Sergio Slobodrian6f5fc4c2017-11-17 15:31:12 -05001FROM golang:1.9.2
Sergio Slobodrianbe829272017-07-17 14:45:45 -04002MAINTAINER Alex Peters <info@alexanderpeters.de>
3
4RUN apt-get update && apt-get install -y apt-transport-https ca-certificates jq
5
6RUN echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list
7RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
8
9RUN apt-get update && apt-cache policy docker-engine && apt-get install -y upx-ucl docker-engine && apt-get clean
10
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"]