pusher/Dockerfile

17 lines
360 B
Docker
Raw Normal View History

2024-05-20 17:57:25 +08:00
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 pusher .
FROM alpine:latest
WORKDIR /work
2024-05-20 20:52:14 +08:00
COPY --from=back /build/pusher /work/
2024-05-20 17:57:25 +08:00
ENTRYPOINT ["/work/pusher"]