refactor Dockerfile to streamline build process and remove unnecessary dependencies
All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 52s

This commit is contained in:
2025-06-16 00:54:20 +08:00
parent e85f4309d9
commit 5c46cdbde6

View File

@ -5,12 +5,6 @@ ENV TZ=Asia/Chongqing
WORKDIR /app WORKDIR /app
RUN apk --no-cache add build-base git tzdata
COPY go.mod go.sum ./
RUN go mod download
COPY . . COPY . .
RUN go build -o main main.go RUN go build -o main main.go
@ -22,8 +16,6 @@ ENV TZ=Asia/Chongqing
WORKDIR /app WORKDIR /app
RUN apk --no-cache add tzdata ca-certificates libc6-compat libgcc libstdc++
COPY --from=builder /app/main /app/main COPY --from=builder /app/main /app/main
EXPOSE 8888 EXPOSE 8888