1 Star 0 Fork 4

Faimly / Thanos

forked from Gitee 极速下载 / Thanos 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile.multi-stage 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
Xiang Dai 提交于 2020-10-29 17:05 . Pin busybox image (#1923)
FROM golang:1.15-alpine3.12 as builder
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
# -----------------------------------------------------------------------------
ARG SHA="0c38f63cbe19e40123668a48c36466ef72b195e723cbfcbe01e9657a5f14cec6"
FROM quay.io/prometheus/busybox@sha256:${SHA}
LABEL maintainer="The Thanos Authors"
COPY --from=builder /go/bin/thanos /bin/thanos
ENTRYPOINT [ "/bin/thanos" ]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/spaceeric/Thanos.git
git@gitee.com:spaceeric/Thanos.git
spaceeric
Thanos
Thanos
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891