From 926921f83a78f67a91bad5eab6073c7072f5d1e1 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Wed, 15 Sep 2021 19:17:23 +0200 Subject: [PATCH] CAPD: improve image build caching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- test/infrastructure/docker/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/infrastructure/docker/Dockerfile b/test/infrastructure/docker/Dockerfile index 52ab9f27bc86..f30bf3795f36 100644 --- a/test/infrastructure/docker/Dockerfile +++ b/test/infrastructure/docker/Dockerfile @@ -22,6 +22,13 @@ FROM ${builder_image} as builder ARG goproxy=https://proxy.golang.org ENV GOPROXY=$goproxy +# Gets additional CAPD dependencies +WORKDIR /tmp + +RUN curl -LO https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl && \ + chmod +x ./kubectl && \ + mv ./kubectl /usr/bin/kubectl + WORKDIR /workspace COPY go.mod go.mod COPY go.sum go.sum @@ -50,13 +57,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /workspace/manager main.go -# Gets additional CAPD dependencies -WORKDIR /tmp - -RUN curl -LO https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl && \ - chmod +x ./kubectl && \ - mv ./kubectl /usr/bin/kubectl - # NOTE: CAPD can't use non-root because docker requires access to the docker socket FROM gcr.io/distroless/static:latest