feat: provision to disable buildah build cache

We experienced slow performance of Buildah in our GitLab instance. The problem occurred when Buildah used the build cache during the image creation. Looks like the network delay between our runner and Harbor (our internal repo) caused this issue. As per Buildah documentation, Buildah creates and pushes an intermediate layer to the repository when using the build cache.

As part of this MR added a flag ‘DOCKER_BUILDAH_CACHE_DISABLED’ to control the build cache of Buildah. This flag can enable or disable the build cache as needed. Cache will be enabled by default.

By disabling cache we have noticed ~50% improvement in build performance.

Note- Not sure similar issue for other build tools, if yes probably the similar flag (may be DOCKER_BUILD_CACHE_DISABLED) to be applied there as well. Unfortunately our runner doesn't support Kaniko, DinD to test it.

Edited by Anoop Mazhavancheri

Merge request reports

Loading