friendica-exporter/Dockerfile

29 lines
587 B
Docker
Raw Normal View History

2024-10-24 20:26:41 +02:00
FROM --platform=$BUILDPLATFORM golang:1.23.2-alpine AS builder
ARG TARGETOS
ARG TARGETARCH
ENV GOOS=$TARGETOS
ENV GOARCH=$TARGETARCH
RUN apk add --no-cache make git bash
WORKDIR /build
COPY go.mod go.sum /build/
RUN go mod download
RUN go mod verify
COPY . /build/
RUN make build-binary
FROM busybox
LABEL maintainer="Philipp Holzer <admin@philipp.info>"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /build/friendica-exporter /bin/friendica-exporter
USER nobody
EXPOSE 9205
ENTRYPOINT ["/bin/friendica-exporter"]