watcher/Dockerfile

17 lines
363 B
Docker
Raw Normal View History

2024-04-10 17:36:56 +08:00
2024-05-13 20:23:24 +08:00
FROM golang as back
2024-04-10 17:36:56 +08:00
WORKDIR /build
COPY . /build
2024-05-13 20:18:13 +08:00
ARG CGO_ENABLED=0
2024-05-13 20:27:39 +08:00
ARG GOPROXY=https://goproxy.cn,direct
2024-05-13 20:18:13 +08:00
ARG GOPRIVATE=gitea.timerzz.com
ARG GONOSUMDB=gitea.timerzz.com
2024-05-13 20:27:39 +08:00
ARG GONOPROXY=gitea.timerzz.com
2024-05-13 20:18:13 +08:00
RUN go build -trimpath -ldflags '-w -s' -o watcher ./main
2024-04-10 17:36:56 +08:00
FROM alpine:latest
WORKDIR /work
COPY --from=back /build/watcher /work/
ENTRYPOINT ["/work/watcher"]