Skip to content

Commit

Permalink
Improve CLI docker caching (#612)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
olix0r authored Mar 29, 2018
1 parent 288e041 commit 6e43575
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/Dockerfile-bin
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 6e43575

Please sign in to comment.