From 9c3f1d9ae3843055c351c7b56610ea08da348f65 Mon Sep 17 00:00:00 2001 From: Gaetan de Villele Date: Thu, 27 Apr 2017 13:36:29 -0700 Subject: [PATCH] add Dockerfile for CI Signed-off-by: Gaetan de Villele --- dockerfiles/Dockerfile.ci | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dockerfiles/Dockerfile.ci diff --git a/dockerfiles/Dockerfile.ci b/dockerfiles/Dockerfile.ci new file mode 100644 index 0000000000..52b3644ab1 --- /dev/null +++ b/dockerfiles/Dockerfile.ci @@ -0,0 +1,29 @@ +# +# This Dockerfile makes the docker builder run the tests. +# It means that if this Dockerfile can be built successfully, +# the tests passed. +# +# From the repo root dir: +# $ docker build -f dockerfiles/Dockerfile.ci . +# + +FROM golang:1.8-alpine + +RUN apk add -U git make + +RUN go get github.com/LK4D4/vndr && \ + cp /go/bin/vndr /usr/bin && \ + rm -rf /go/src/* /go/pkg/* /go/bin/* + +RUN go get github.com/mitchellh/gox && \ + cp /go/bin/gox /usr/bin && \ + rm -rf /go/src/* /go/pkg/* /go/bin/* + +COPY . /go/src/github.com/docker/cli + +ENV CGO_ENABLED=0 +WORKDIR /go/src/github.com/docker/cli + +RUN make cross + +CMD sh