watcher/Dockerfile
timerzz 0bf0ba1f39
Some checks failed
Build image / build (push) Failing after 1m10s
feat 修改golang版本
2024-05-21 17:04:07 +08:00

17 lines
368 B
Docker

FROM golang:1.22 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"]