This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM golang as build
|
||||
FROM golang:alpine as build
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
@@ -7,12 +7,14 @@ COPY . .
|
||||
ENV GO111MODULE=on
|
||||
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
|
||||
|
||||
COPY --from=build /build/app /bin
|
||||
|
||||
RUN ls -lh
|
||||
|
||||
ENTRYPOINT ["/bin/app"]
|
Reference in New Issue
Block a user