18 lines
201 B
Docker
18 lines
201 B
Docker
|
FROM golang as build
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY . .
|
||
|
|
||
|
ENV GO111MODULE=on
|
||
|
ENV GOPROXY=https://goproxy.cn,direct
|
||
|
|
||
|
RUN go mod download
|
||
|
|
||
|
RUN go build -o app
|
||
|
|
||
|
FROM alpine
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --from=build /app/app .
|