diff --git a/Dockerfile b/Dockerfile index 115a2fd..43b6159 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,12 @@ FROM golang:1.17 as build LABEL description="Build container" ENV CGO_ENABLED 0 -COPY . /build WORKDIR /build +COPY go.mod . +COPY go.sum . +RUN go mod download + +COPY . . RUN go build github.com/RafayLabs/rcloud-base FROM alpine:latest as runtime