-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
42 lines (33 loc) · 1.46 KB
/
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
34
35
36
37
38
39
40
41
42
FROM --platform=$BUILDPLATFORM golang:1.21-alpine3.19 as builder
ARG TARGETOS
ARG TARGETARCH
RUN apk add --update --no-cache ca-certificates tzdata git make bash && update-ca-certificates
ADD . /opt
WORKDIR /opt
RUN git update-index --refresh; make build OS=${TARGETOS} ARCH=${TARGETARCH}
FROM alpine:3.19 as runner
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /opt/thanos-rule-syncer /bin/thanos-rule-syncer
ARG BUILD_DATE
ARG VERSION
ARG VCS_REF
ARG DOCKERFILE_PATH
LABEL vendor="Observatorium" \
name="observatorium/thanos-rule-syncer" \
description="Thanos Rule Syncer" \
io.k8s.display-name="observatorium/thanos-rule-syncer" \
io.k8s.description="Thanos Rule Syncer" \
maintainer="Observatorium <[email protected]>" \
version="$VERSION" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Thanos Rule Syncer" \
org.label-schema.docker.cmd="docker run --rm observatorium/thanos-rule-syncer" \
org.label-schema.docker.dockerfile=$DOCKERFILE_PATH \
org.label-schema.name="observatorium/thanos-rule-syncer" \
org.label-schema.schema-version="1.0" \
org.label-schema.vcs-branch=$VCS_BRANCH \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/observatorium/thanos-rule-syncer" \
org.label-schema.vendor="observatorium/thanos-rule-syncer" \
org.label-schema.version=$VERSION
ENTRYPOINT ["/bin/thanos-rule-syncer"]