watcher/Dockerfile
timerzz 0d57e2950b
Some checks failed
Build image / build (push) Failing after 19s
feat 修改构建使用的golang镜像
2024-05-13 20:23:24 +08:00

16 lines
331 B
Docker

FROM golang as back
ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /build
COPY . /build
ARG CGO_ENABLED=0
ARG GOPRIVATE=gitea.timerzz.com
ARG GONOSUMDB=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"]