Skip to content

Commit

Permalink
image: fix docker schema v1 -> OCI conversion
Browse files Browse the repository at this point in the history
Chasing containers#380; DiffIDs are required in the OCI format, but we were
skipping them because of this check. Without this, converting from a V1
image registry source to an OCI layout results in broken images.

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
  • Loading branch information
jonboulle committed Feb 12, 2018
1 parent 3ab2e31 commit 6d6a6ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion image/docker_schema1.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (m *manifestSchema1) imageInspectInfo() (*types.ImageInspectInfo, error) {
// This is a horribly specific interface, but computing InformationOnly.LayerDiffIDs can be very expensive to compute
// (most importantly it forces us to download the full layers even if they are already present at the destination).
func (m *manifestSchema1) UpdatedImageNeedsLayerDiffIDs(options types.ManifestUpdateOptions) bool {
return options.ManifestMIMEType == manifest.DockerV2Schema2MediaType
return (options.ManifestMIMEType == manifest.DockerV2Schema2MediaType || options.ManifestMIMEType == imgspecv1.MediaTypeImageManifest)
}

// UpdatedImage returns a types.Image modified according to options.
Expand Down

0 comments on commit 6d6a6ea

Please sign in to comment.