I'm checking the newly available feature in the pipeline for the docker buildkit. Trying to utilize the build cache feature to improve the build speed. But after some tests, I noticed the cache layer can't be reused consistently.
The build command I used is
docker build orch-tool --tag image-name --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from image-name-at-registry
docker tag image-name image-name-at-registry
docker push image-name-at-registry
I tested the above commands locally without issue, and the caching works perfectly. But when tested in the pipeline, it doesn't work.
The dockerfile contains `apt update` in early layers, not sure if this is the problem.