fix: add PKG_CONFIG_PATH and remove unused import
Build and Deploy / build (push) Failing after 1m47s
Build and Deploy / deploy (push) Has been skipped

This commit is contained in:
2026-07-16 11:01:15 +00:00
parent dd57797864
commit d894592355
2 changed files with 7 additions and 4 deletions
+6 -2
View File
@@ -15,9 +15,13 @@ WORKDIR /app
# 复制源代码
COPY . .
# 构建 (启用 CGO)
# 设置 CGO 编译环境
ENV CGO_ENABLED=1
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig
# 构建
RUN go mod download || true
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w" -o anticaptcha ./cmd/server
RUN go build -ldflags="-s -w" -o anticaptcha ./cmd/server
# 运行阶段
FROM alpine:3.20
-1
View File
@@ -2,7 +2,6 @@ package database
import (
"fmt"
"log"
"anticaptcha/internal/config"
"anticaptcha/internal/model"