diff --git a/Dockerfile b/Dockerfile index 53c5d538..eff0cbc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ COPY pkg/ pkg/ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go RUN chmod 777 /etc /etc/ssl && chmod -R 777 /etc/ssl/certs && \ - mkdir /charts && chmod -R 777 /charts + mkdir /.cache /charts && chmod -R 777 /.cache /charts # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details @@ -42,6 +42,7 @@ WORKDIR / COPY --from=builder /workspace/manager . COPY --from=builder /workspace/helm . COPY --from=builder --chown=65532:65532 /etc /etc +COPY --from=builder --chown=65532:65532 /.cache /.cache COPY --from=builder --chown=65532:65532 /charts /charts USER 65532:65532