🐳
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
谢作欢 2023-11-03 11:23:48 +08:00
parent 55632156bd
commit 8fc07f2cd2

View File

@ -1,4 +1,4 @@
FROM golang as build FROM golang:alpine as build
WORKDIR /build WORKDIR /build
@ -7,12 +7,14 @@ COPY . .
ENV GO111MODULE=on ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct ENV GOPROXY=https://goproxy.cn,direct
RUN go mod download RUN go mod download && go build -o app
RUN go build -o app RUN ls -lh && chmod +x ./app
FROM alpine FROM alpine
COPY --from=build /build/app /bin COPY --from=build /build/app /bin
RUN ls -lh
ENTRYPOINT ["/bin/app"] ENTRYPOINT ["/bin/app"]