static build

This commit is contained in:
2025-10-21 11:52:48 +02:00
parent c7eb782b88
commit 7a15530855
2 changed files with 3 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ WORKDIR /work
COPY go.mod . COPY go.mod .
COPY . . COPY . .
RUN go mod download RUN go mod download
RUN go build RUN make
FROM alpine:latest FROM alpine:latest
LABEL maintainer="Thomas von Dein <git@daemon.de>" LABEL maintainer="Thomas von Dein <git@daemon.de>"

2
Makefile Normal file
View File

@@ -0,0 +1,2 @@
all:
CGO_LDFLAGS='-static' go build -tags osusergo,netgo -ldflags "-extldflags=-static" -o io-exporter