I'm seeing some weird behavior building images using buildx.
docker buildx build
--cache-from $IMAGE:$PREVIOUS_BUILD_SHA
--cache-to type=inline
--file Dockerfile
--output type=docker
--progress plain
--tag $IMAGE:$CURRENT_SHA
--tag $IMAGE:latest .
I'm running this in a gitlab ci pipeline and it seems that the first build on a new branch (when there is no cache as $IMAGE includes the branch name) it works fine, but on following builds it's like it's skipping layers?
The output looks right, but when pull the images the first one is definitely larger than subsequent builds, and trying to run a container with the image fails as a bin that's called from the entrypoint script is missing.
Anyone seen this kind of thing? Any pointers?