fix: add PKG_CONFIG_PATH and remove unused import
This commit is contained in:
+6
-2
@@ -15,9 +15,13 @@ WORKDIR /app
|
|||||||
# 复制源代码
|
# 复制源代码
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# 构建 (启用 CGO)
|
# 设置 CGO 编译环境
|
||||||
|
ENV CGO_ENABLED=1
|
||||||
|
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig
|
||||||
|
|
||||||
|
# 构建
|
||||||
RUN go mod download || true
|
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
|
FROM alpine:3.20
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package database
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
|
|
||||||
"anticaptcha/internal/config"
|
"anticaptcha/internal/config"
|
||||||
"anticaptcha/internal/model"
|
"anticaptcha/internal/model"
|
||||||
|
|||||||
Reference in New Issue
Block a user