forked from portworx/torpedo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (33 loc) · 1.02 KB
/
Dockerfile
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
42
FROM golang:1.9.2-alpine AS build
LABEL maintainer="[email protected]"
WORKDIR /go/src/github.com/portworx/torpedo
# Install setup dependencies
RUN apk update && \
apk add git && \
apk add make && \
apk add openssh-client && \
go get github.com/onsi/ginkgo/ginkgo && \
go get github.com/onsi/gomega && \
go get github.com/sirupsen/logrus
# No need to copy *everything*. This keeps the cache useful
COPY deployments deployments
COPY drivers drivers
COPY pkg pkg
COPY scripts scripts
COPY tests tests
COPY vendor vendor
COPY Makefile Makefile
# Why? Errors if this is removed
COPY .git .git
# Compile
RUN mkdir bin && \
make build
# Build a fresh container with just the binaries
FROM alpine
WORKDIR /go/src/github.com/portworx/torpedo
# Copy just ginkgo & binaries over from previous container
COPY --from=build /go/bin/ginkgo /bin/ginkgo
COPY --from=build /go/src/github.com/portworx/torpedo/bin bin
COPY drivers drivers
ENTRYPOINT ["ginkgo", "--failFast", "--slowSpecThreshold", "180", "-v", "-trace"]
CMD []