-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.test
41 lines (30 loc) · 1.06 KB
/
Dockerfile.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# FIXME commonize with Dockerfile
FROM golang:1.12-alpine
# git, build-base, curl
RUN apk --update add git build-base \
&& rm -rf /var/cache/apk/*
# From docker-gc
# https://github.com/spotify/docker-gc/blob/master/Dockerfile
ENV DOCKER_VERSION 17.09.0-ce
# We get curl so that we can avoid a separate ADD to fetch the Docker binary, and then we'll remove it
RUN apk --update add bash curl \
&& cd /tmp/ \
&& curl -sSL -O https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
&& tar zxf docker-${DOCKER_VERSION}.tgz \
&& mkdir -p /usr/local/bin/ \
&& mv $(find -name 'docker' -type f) /usr/local/bin/ \
&& chmod +x /usr/local/bin/docker \
&& apk del curl \
&& rm -rf /tmp/* \
&& rm -rf /var/cache/apk/*
ENV BUILD_HOME=$GOPATH/src/github.com/tetra2000/canary
# dep
RUN go get -u github.com/golang/dep/cmd/dep
ADD . $BUILD_HOME
WORKDIR $BUILD_HOME
# FIXME Final image depends on builder image.
ENV CGO_ENABLED=1
ARG USE_HOST_VENDOR=0
RUN ./scripts/dep_ensure.sh
RUN ./scripts/build_default_plugins.sh
RUN go test -v ./...