The documentation for build argument --iidfile states: --iidfile, Write the image ID to the file.
The image imported to docker does not correspond to the iidfile contents.
When using:
docker buildx build --tag kalamaja --load --iidfile id --progress plain .
On dockerfile:
...
#6 exporting manifest sha256:305dbeb87452bc1457231f97e698d19db38c61def97a7a2982e6eae83256f7b6 0.0s done
#6 exporting config sha256:e384d63460089a5a38d739dc1fd82092caaaff3c158c324faae54ffda974a455 0.0s done
#6 sending tarball
#6 sending tarball 0.4s done
#6 DONE 0.8s
#7 importing to docker
#7 DONE 0.2s
The result is:
# cat id; echo
sha256:305dbeb87452bc1457231f97e698d19db38c61def97a7a2982e6eae83256f7b6
# docker image ls | head -2
REPOSITORY TAG IMAGE ID CREATED SIZE
kalamaja latest e384d6346008 3 minutes ago 5.57MB
# docker image inspect e384d6346008 | jq .[0].Id
"sha256:e384d63460089a5a38d739dc1fd82092caaaff3c158c324faae54ffda974a455"
The documentation for
buildargument--iidfilestates:--iidfile, Write the image ID to the file.The image imported to docker does not correspond to the iidfile contents.
When using:
On dockerfile:
The result is: