Skip to content

Commit 0973182

Browse files
committed
[docker] use go modules
1 parent 92ba2b1 commit 0973182

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
FROM golang:1.11
2-
RUN go get -d -v github.com/rapidloop/pgmetrics
3-
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /root/pgmetrics github.com/rapidloop/pgmetrics/cmd/pgmetrics
2+
RUN GO111MODULES=on CGO_ENABLED=0 GOOS=linux go get -a -installsuffix cgo github.com/rapidloop/pgmetrics/cmd/pgmetrics
43

54
FROM alpine:latest
65
RUN apk --no-cache add ca-certificates
7-
COPY --from=0 /root/pgmetrics /bin/pgmetrics
6+
COPY --from=0 /go/bin/pgmetrics /bin/pgmetrics
87
ENTRYPOINT ["/bin/pgmetrics"]
98

0 commit comments

Comments
 (0)