Docker V1 vs V2 - Are there any differences in storage consumption?

Docker V1 vs V2 - Are there any differences in storage consumption?

AuthorFullName__c
JFrog Support
articleNumber
000001336
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:35:37Z
lastModifiedDate
2023-02-26T21:14:53Z
VersionNumber
4

The Storage Consumption Differences Between Docker V1 and V2


Apart from new DB references, the migration process from Docker V1 to V2 should not consume additional space. Nevertheless, the Storage Summary page in your Artifactory UI may indicate larger space utilization for the V2 repository. However, if you compare this to the V1 repository that you migrated to V2, you’ll see this doesn’t actually mean that a larger amount of disk space is actually being consumed by the V2 repository. This is due to the fact that a V2 Docker repo is structured differently from a V1 repo. In V1, blobs (or layers) are stored globally inside the .images directory whereas, in V2, the structure requires all blobs to be present in each tag's specific path. This result is that some blobs which are being shared by several images will have multiple DB references in a V2 repo. 

It’s also important to note that as Artifactory relies on checksum-based storage, it will only create "pointer" DB references for newly-created V2 files, which will not require additional file-system storage consumption. In fact, when examining your V2 repo on the Storage Summary page, you might be seeing larger disk space utilization because Artifactory denotes the space that would be consumed if the repository was exported. 

If you've ever wondered why a repository export or backup is larger than the file-system storage, this is why. Therefore, since exports aren’t checksum based, the storage space record is taking into consideration each binary multiplied by all its references.