Docker today does not use git for any resource versioning. Nonetheless:
- Rely on hashing to uniquely identify file system levels: this is what can make it look like git to a user
- Take the initial inspiration in the concept of commit , push and pull
One thing that makes this super obvious is the docker history , which will show you all the successive “commits” (ie operations) that make up the image, each of which has an individual hash:
$ docker history dev IMAGE CREATED CREATED BY SIZE COMMENT 437e07e119e1 11 minutes ago /bin/sh -c
It should be noted that Docker moves to content-addressable layers, so these hashes are not randomly generated ( like git does ), but uniquely identifies this content.
source share