forked from gotestyourself/gotest.tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (25 loc) · 1022 Bytes
/
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
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION:-1.12-alpine} as golang
RUN apk add -U curl git bash
WORKDIR /go/src/gotest.tools
ENV CGO_ENABLED=0 \
PS1="# " \
GO111MODULE=on
FROM golang as tools
RUN go get github.com/dnephin/[email protected]
ARG DEP_TAG=v0.4.1
RUN export GO111MODULE=off; \
go get -d github.com/golang/dep/cmd/dep && \
cd /go/src/github.com/golang/dep && \
git checkout -q "$DEP_TAG" && \
go build -o /usr/bin/dep ./cmd/dep
RUN go get gotest.tools/[email protected]
RUN wget -O- -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s && \
mv bin/golangci-lint /go/bin
FROM golang as dev
COPY --from=tools /go/bin/filewatcher /usr/bin/filewatcher
COPY --from=tools /usr/bin/dep /usr/bin/dep
COPY --from=tools /go/bin/gotestsum /usr/bin/gotestsum
COPY --from=tools /go/bin/golangci-lint /usr/bin/golangci-lint
FROM dev as dev-with-source
COPY . .