mirror of
https://github.com/vmware-tanzu/velero.git
synced 2025-12-23 06:15:21 +00:00
In #3310, the Dockerfile for the Tilt Velero container was modified to call the `./hack/download-restic.sh` script. A side effect of this change was that the context for the docker build was much larger as it was the root of the Velero repo, rather than just the `_tiltbuild` directory. With the frequent rebuilds of the image that happen when using Tilt, a large amounts of disk space was being consumed by the different layers of images builds in the Docker overlay filesystem (as diffs could include the `.go` directory which can be several GBs). This change modifies the `download-restic.sh` script to allow the output directory for the restic binary to be configured. This means that the script can be called directly from the Tiltfile and can be managed outside the container build. This allows us to restore the previous `_tiltbuild` context. It also speeds up image builds as we can download restic once and use it for all builds rather than redownloading frequently. Signed-off-by: Bridget McErlean <bmcerlean@vmware.com>