This commit is contained in:
starry
2026-03-17 21:50:59 +08:00
committed by GitHub
parent bc7d8611d6
commit 905187c0d3

View File

@@ -4,11 +4,11 @@ ARG TARGETARCH
WORKDIR /app
COPY go.mod go.sum .
RUN go mod download && apk add upx --no-cache
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-s -w" -trimpath -o qqbot . && upx -9 qqbot
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-s -w" -trimpath -o qqbot .
FROM alpine