watcher/Dockerfile
timerzz ba47d0a32a
Some checks failed
Build image / build (push) Failing after 20s
feat 抽出公共方法到common
2024-05-13 20:18:13 +08:00

19 lines
469 B
Docker

FROM golang:alpine 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
ARG HTTP_PROXY=http://192.168.31.55:10809
ARG HTTPS_PROXY=http://192.168.31.55:10809
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /work
COPY --from=back /build/watcher /work/
ENTRYPOINT ["/work/watcher"]