File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change
1
+ FROM golang:1.14.2-alpine3.11 as builder
2
+ WORKDIR $GOPATH/src/github.com/thanos-io/thanosbench
3
+ # Change in the docker context invalidates the cache so to leverage docker
4
+ # layer caching, moving update and installing apk packages above COPY cmd
5
+ # More info https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache
6
+ RUN apk update && apk upgrade && apk add --no-cache alpine-sdk
7
+ # Replaced ADD with COPY as add is generally to download content form link or tar files
8
+ # while COPY supports the basic copying of local files into the container.
9
+ # https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
10
+ COPY . $GOPATH/src/github.com/thanos-io/thanosbench
11
+ RUN git update-index --refresh; make build
12
+ # -----------------------------------------------------------------------------
1
13
FROM quay.io/prometheus/busybox:latest
2
14
LABEL maintainer="The Thanos Authors"
3
-
4
- COPY thanosbench /bin/thanosbench
5
-
6
- ENTRYPOINT [ "/bin/thanosbench" ]
15
+ COPY --from=builder /go/src/github.com/thanos-io/thanosbench/thanosbench /bin/thanosbench
16
+ ENTRYPOINT [ "/bin/thanosbench" ]
You can’t perform that action at this time.
0 commit comments