From 6e435754a1a70bc0daebcf839d8de7492961635d Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Thu, 29 Mar 2018 09:29:06 -0700 Subject: [PATCH] Improve CLI docker caching (#612) Currently, the CLI docker image copies the entire `controller` directory, though the CLI only requires a few of its subdirectories. This causes the CLI's docker cache to be needlessly invalidated when, for instance, a service implementation changes. By restricting the copied directories to `controller/{api,public,util}`, build caching is improved. --- cli/Dockerfile-bin | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/Dockerfile-bin b/cli/Dockerfile-bin index c8913a030e92f..29b3c64c4ff38 100644 --- a/cli/Dockerfile-bin +++ b/cli/Dockerfile-bin @@ -3,7 +3,9 @@ FROM gcr.io/runconduit/go-deps:cc2413fa as golang ARG CONDUIT_VERSION WORKDIR /go/src/github.com/runconduit/conduit COPY cli cli -COPY controller controller +COPY controller/api controller/api +COPY controller/gen controller/gen +COPY controller/util controller/util COPY pkg pkg RUN mkdir -p /out ENV GO_LDFLAGS="-s -w -X github.com/runconduit/conduit/pkg/version.Version=${CONDUIT_VERSION}"