From 7a15530855269a0515b37c53527f932bd5451a47 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Tue, 21 Oct 2025 11:52:48 +0200 Subject: [PATCH] static build --- Dockerfile | 2 +- Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index 3024e96..98d9379 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ WORKDIR /work COPY go.mod . COPY . . RUN go mod download -RUN go build +RUN make FROM alpine:latest LABEL maintainer="Thomas von Dein " diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8a96d8f --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +all: + CGO_LDFLAGS='-static' go build -tags osusergo,netgo -ldflags "-extldflags=-static" -o io-exporter