-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I have been investigating this without success, it seems we need to generate a SH256 hash some image configuration in order to generate an ImageId, then, we need to check if that ImageId does exist, if it does use it, else create a new one. The problem is that I haven't been able to recreate the ImageId
Resources found
https://stackoverflow.com/questions/47249028/how-to-generate-docker-image-layer-diffid
https://github.com/moby/moby/blob/master/image/image.go
https://github.com/moby/moby/blob/master/image/image_test.go
https://github.com/moby/moby/blob/master/image/store.go
https://github.com/moby/moby/blob/master/image/store_test.go
https://stackoverflow.com/questions/39299597/how-is-digest-of-docker-image-calculated
https://docs.docker.com/engine/reference/commandline/images/#list-the-full-length-image-ids
https://gist.github.com/aaronlehmann/b42a2eaf633fc949f93b#new-image-config
https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache
https://stackoverflow.com/questions/38655630/how-does-docker-know-when-to-use-the-cache-during-a-build-and-when-not
https://windsock.io/explaining-docker-image-ids/