watcher/Dockerfile
timerzz f0e46a4116
All checks were successful
Build image / build (push) Successful in 1m39s
feat 添加GONOPROXY
2024-05-13 20:27:39 +08:00

17 lines
363 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 watcher ./main
FROM alpine:latest
WORKDIR /work
COPY --from=back /build/watcher /work/
ENTRYPOINT ["/work/watcher"]