add build workflows and docker image

This commit is contained in:
2025-10-21 10:59:53 +02:00
parent 39009ccb35
commit 4ed1f26694
7 changed files with 214 additions and 0 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM golang:1.24-alpine as builder
RUN apk update
RUN apk upgrade
RUN apk add --no-cache git make
RUN git --version
WORKDIR /work
COPY go.mod .
COPY . .
RUN go mod download
RUN go build
FROM alpine:latest
LABEL maintainer="Thomas von Dein <git@daemon.de>"
WORKDIR /app
COPY --from=builder /work/io-exporter /app/io-exporter
USER 1001:1001
ENTRYPOINT ["/app/io-exporter"]
CMD ["-h"]