Skip to content

Commit

Permalink
Merge pull request kubernetes-sigs#513 from leakingtapan/dockerfiler
Browse files Browse the repository at this point in the history
optimization: cache go mod during docker build
  • Loading branch information
Cheng Pan authored May 25, 2020
2 parents 1dd5062 + ecc06ae commit c972094
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@

FROM golang:1.14.1-stretch as builder
WORKDIR /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver

# Cache go modules
COPY go.mod .
COPY go.sum .
RUN go mod download

ADD . .
RUN make
RUN go test ./pkg/...

FROM amazonlinux:2
RUN yum install ca-certificates e2fsprogs xfsprogs util-linux -y
Expand Down

0 comments on commit c972094

Please sign in to comment.