2022-11-25 09:02:43 +01:00
|
|
|
FROM alpine:3.17.0 as builder
|
2022-11-04 21:02:52 +01:00
|
|
|
|
2022-11-04 21:10:15 +01:00
|
|
|
WORKDIR /go/src/github.com/systemli/prometheus-mastodon-exporter
|
2022-11-04 21:02:52 +01:00
|
|
|
|
|
|
|
ENV USER=appuser
|
|
|
|
ENV UID=10001
|
|
|
|
|
|
|
|
RUN adduser \
|
|
|
|
--disabled-password \
|
|
|
|
--gecos "" \
|
|
|
|
--home "/nonexistent" \
|
|
|
|
--shell "/sbin/nologin" \
|
|
|
|
--no-create-home \
|
|
|
|
--uid "${UID}" \
|
|
|
|
"${USER}"
|
|
|
|
|
|
|
|
RUN apk add --no-cache --update ca-certificates
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
|
|
|
|
COPY --from=builder /etc/passwd /etc/passwd
|
|
|
|
COPY --from=builder /etc/group /etc/group
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
2022-11-04 21:10:15 +01:00
|
|
|
COPY prometheus-mastodon-exporter /prometheus-mastodon-exporter
|
2022-11-04 21:02:52 +01:00
|
|
|
|
|
|
|
USER appuser:appuser
|
|
|
|
|
|
|
|
EXPOSE 13120
|
|
|
|
|
2022-11-04 21:10:15 +01:00
|
|
|
ENTRYPOINT ["/prometheus-mastodon-exporter"]
|