I have a single stage Dockerfile. If I build it with docker-compose from scratch, everything works well. In this build I have BUILDKIT_INLINE_CACHE=1 and I'm pushing to AWS ECR. When, for subsequent builds, I use the previously built image as a cache with cache_from, the subsequent build will be built to the wrong step (as evidenced by missing files in the image) despite every step showing up in the output as CACHED.
This is making it impossible to rely on the cache.