Update dockerfile

This commit is contained in:
9seconds
2026-02-11 13:55:11 +01:00
parent 3e4faf6ba6
commit 0faf482e52
+9 -6
View File
@@ -1,24 +1,27 @@
############################################################################### ###############################################################################
# BUILD STAGE # BUILD STAGE
FROM alpine:3 AS build FROM golang:1.26-alpine AS build
ENV CGO_ENABLED=0 ENV CGO_ENABLED=0
ENV GOOS=linux
RUN set -x \ RUN set -x \
&& apk --no-cache --update add \ && apk --no-cache --update add \
bash \ bash \
ca-certificates \ ca-certificates \
git \ git
mise
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app
RUN set -x \ RUN set -x \
&& mise trust \ && version="$(git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)" \
&& mise tasks run static && go build \
-trimpath \
-mod=readonly \
-ldflags="-extldflags '-static' -s -w -X 'main.version=$version'" \
-a \
-tags netgo
############################################################################### ###############################################################################