docker: cache go compiler

This commit is contained in:
Leonard Cohnen 2022-11-07 15:28:56 +01:00 committed by 3u13r
parent 759c626e0f
commit 152978045c
5 changed files with 6 additions and 6 deletions

View file

@ -23,7 +23,7 @@ RUN rm -rf ./hack/
# Build the access_manager
WORKDIR /constellation/access_manager/
RUN CGO_ENABLED=0 go build -o /constellation/build/access_manager -ldflags "-s -w" .
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -o /constellation/build/access_manager -ldflags "-s -w" .
# Copy the access_manager from build into a scratch container, which is eventually deployed into the cluster
FROM scratch as release