From 9af5a1d11deb9de733a96953c8d3b6ef0327c12e Mon Sep 17 00:00:00 2001 From: JustSong Date: Sat, 1 Feb 2025 13:13:43 +0800 Subject: [PATCH] fix: try to fix docker build problem --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 712bda9..36c5462 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,11 +14,15 @@ RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat /web/default/VERSION) n DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat /web/air/VERSION) npm run build --prefix /web/air & \ wait -FROM golang AS builder2 +FROM golang:alpine AS builder2 + +RUN apk add --no-cache g++ gcc musl-dev libc-dev sqlite-dev build-base ENV GO111MODULE=on \ CGO_ENABLED=1 \ - GOOS=linux + GOOS=linux \ + CGO_CFLAGS="-I/usr/include" \ + CGO_LDFLAGS="-L/usr/lib" WORKDIR /build ADD go.mod go.sum ./