From b008ef8ecfd5b3bb085dc323e0afe6ea821a1fd1 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Sat, 23 Mar 2019 23:02:35 -0700 Subject: [PATCH] hack: update vendor dockerfile Signed-off-by: Tonis Tiigi --- hack/dockerfiles/vendor.Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hack/dockerfiles/vendor.Dockerfile b/hack/dockerfiles/vendor.Dockerfile index 6fd12e5d..8049fd78 100644 --- a/hack/dockerfiles/vendor.Dockerfile +++ b/hack/dockerfiles/vendor.Dockerfile @@ -1,9 +1,11 @@ # syntax = docker/dockerfile:1.0-experimental FROM golang:1.12-alpine AS vendored -RUN apk add --no-cache git +RUN apk add --no-cache git rsync WORKDIR /src -RUN --mount=target=/src,rw \ +RUN --mount=target=/context \ + --mount=target=.,type=tmpfs,readwrite \ --mount=target=/go/pkg/mod,type=cache \ + rsync -a /context/. . && \ go mod tidy && go mod vendor && \ mkdir /out && cp -r go.mod go.sum vendor /out @@ -11,7 +13,9 @@ FROM scratch AS update COPY --from=vendored /out /out FROM vendored AS validate -RUN --mount=target=.,rw \ +RUN --mount=target=/context \ + --mount=target=.,type=tmpfs,readwrite \ + rsync -a /context/. . && \ git add -A && \ rm -rf vendor && \ cp -rf /out/* . && \