us-coach-spider/Dockerfile
timerzz ddc538f99b
All checks were successful
Build image / build (push) Successful in 1m31s
fix 修改构建问题
2024-05-14 15:42:41 +08:00

17 lines
362 B
Docker

FROM golang as back
WORKDIR /build
COPY . /build
ARG CGO_ENABLED=0
ARG GOPROXY=https://goproxy.cn,direct
ARG GOPRIVATE=gitea.timerzz.com
ARG GONOSUMDB=gitea.timerzz.com
ARG GONOPROXY=gitea.timerzz.com
RUN go build -trimpath -ldflags '-w -s' -o product ./cmd
FROM alpine:latest
WORKDIR /work
COPY --from=back /build/product /work/
ENTRYPOINT ["/work/product"]