Adding the COMMIT ARG before the FROM causes the build to use the cache for all layers even when the kubernetes-cloud code has changed. This is because:
An ARG declared before a FROM is outside of a build stage, so it can’t be used in any instruction after a FROM
Adding the COMMIT ARG before the
FROM
causes the build to use the cache for all layers even when the kubernetes-cloud code has changed. This is because:Build from this commit pulls the new code