From 0faf482e52d93105b3f01980557ff59299eec150 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Wed, 11 Feb 2026 13:55:11 +0100 Subject: [PATCH] Update dockerfile --- Dockerfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c2e90e0..43d996b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,27 @@ ############################################################################### # BUILD STAGE -FROM alpine:3 AS build +FROM golang:1.26-alpine AS build ENV CGO_ENABLED=0 -ENV GOOS=linux RUN set -x \ && apk --no-cache --update add \ bash \ ca-certificates \ - git \ - mise + git COPY . /app WORKDIR /app RUN set -x \ - && mise trust \ - && mise tasks run static + && version="$(git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)" \ + && go build \ + -trimpath \ + -mod=readonly \ + -ldflags="-extldflags '-static' -s -w -X 'main.version=$version'" \ + -a \ + -tags netgo ###############################################################################