-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathContainerfile
More file actions
21 lines (16 loc) · 779 Bytes
/
Containerfile
File metadata and controls
21 lines (16 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ARG GO_VERSION
FROM --platform=$BUILDPLATFORM golang:$GO_VERSION-alpine AS builder
ARG TARGETOS TARGETARCH
RUN apk add -U --no-cache ca-certificates tzdata
WORKDIR /build
COPY ./ ./
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build github.com/alexbakker/alertmanager-ntfy/cmd/alertmanager-ntfy
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/share/zoneinfo/ /usr/share/zoneinfo/
COPY --from=builder /build/alertmanager-ntfy /bin/
EXPOSE 8000
ENTRYPOINT ["/bin/alertmanager-ntfy"]
LABEL org.opencontainers.image.source=https://github.com/alexbakker/alertmanager-ntfy
LABEL org.opencontainers.image.description="Container image for alertmanager-ntfy"
LABEL org.opencontainers.image.licenses=GPL-3.0-only