feat 修改构建使用的golang镜像
Some checks failed
Build image / build (push) Failing after 19s

This commit is contained in:
timerzz 2024-05-13 20:23:24 +08:00
parent ba47d0a32a
commit 0d57e2950b

View File

@ -1,5 +1,5 @@
FROM golang:alpine as back FROM golang as back
ARG GOPROXY=https://goproxy.cn,direct ARG GOPROXY=https://goproxy.cn,direct
WORKDIR /build WORKDIR /build
COPY . /build COPY . /build
@ -9,9 +9,6 @@ ARG GONOSUMDB=gitea.timerzz.com
RUN go build -trimpath -ldflags '-w -s' -o watcher ./main RUN go build -trimpath -ldflags '-w -s' -o watcher ./main
FROM alpine:latest 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 WORKDIR /work
COPY --from=back /build/watcher /work/ COPY --from=back /build/watcher /work/
ENTRYPOINT ["/work/watcher"] ENTRYPOINT ["/work/watcher"]