us-coach-spider/Dockerfile

17 lines
355 B
Docker
Raw Normal View History

2024-05-14 15:27:40 +08:00
2024-05-14 21:52:30 +08:00
FROM golang:1.22 as back
2024-05-14 15:27:40 +08:00
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
2024-05-14 22:00:23 +08:00
RUN go build -trimpath -ldflags '-w -s' -o run ./cmd
2024-05-14 15:27:40 +08:00
FROM alpine:latest
WORKDIR /work
2024-05-14 16:44:43 +08:00
COPY --from=back /build/run /work/
ENTRYPOINT ["/work/run"]
2024-05-14 15:27:40 +08:00