From befd5c6a8a3d99288e49f218dfc64dce1f4e4ebc Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Thu, 10 Oct 2024 17:46:41 +0800 Subject: [PATCH] feat: disable cgo in docker --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 88a3bc7..a2f896f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ COPY . . COPY --from=flutter /app/build/web ./ui/build/web/ # 指定OS等,并go build -RUN CGO_ENABLED=1 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long)" ./cmd/ +RUN CGO_ENABLED=0 go build -o polaris -ldflags="-X polaris/db.Version=$(git describe --tags --long)" ./cmd/ FROM debian:stable-slim ENV TZ="Asia/Shanghai" GIN_MODE=release PUID=0 PGID=0 UMASK=0 PERMS=true