Skip to content

Commit

Permalink
Leveraging docker layer caching
Browse files Browse the repository at this point in the history
Signed-off-by: ankitjain28may <ankitjain28may77@gmail.com>
  • Loading branch information
ankitjain28may committed Apr 23, 2020
1 parent 34ba724 commit b237651
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ We use *breaking* word for marking changes that are not backward compatible (rel
### Changed

- [#2505](https://github.com/thanos.io/thanos/pull/2505) Store: remove obsolete `thanos_store_node_info` metric.

- [#2508](https://github.com/thanos.io/thanos/pull/2508) Dockerfile: Leveraging docker layer caching.

## [v0.12.1](https://github.com/thanos-io/thanos/releases/tag/v0.12.1) - 2020.04.20

### Fixed
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile.multi-stage
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM golang:1.13.6-alpine3.11 as builder

ADD . $GOPATH/src/github.com/thanos-io/thanos
WORKDIR $GOPATH/src/github.com/thanos-io/thanos

# Change in the docker context invalidates the cache so to leverage docker
# layer caching, moving update and installing apk packages above COPY cmd
# More info https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache
RUN apk update && apk upgrade && apk add --no-cache alpine-sdk
# Replaced ADD with COPY as add is generally to download content form link or tar files
# while COPY supports the basic copying of local files into the container.
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
COPY . $GOPATH/src/github.com/thanos-io/thanos

RUN git update-index --refresh; make build

Expand Down

0 comments on commit b237651

Please sign in to comment.