Skip to content

Commit ff6008a

Browse files
committed
Revert "Hotfix: Do not fetch manifest lists from Docker registries"
This reverts commit bf1ca2e. We can now process the manifest lists ourselves. Because docker_transport_test.go tests "//busybox".NewImage(), which will now process transport lists, also add an architecture/OS override to keep the test working e.g. on macOS, for which Docker does not publish an image in the manifest list. Signed-off-by: Miloslav Trmač <[email protected]>
1 parent 00f4e20 commit ff6008a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docker/docker_transport_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ func TestReferencePolicyConfigurationNamespaces(t *testing.T) {
152152
func TestReferenceNewImage(t *testing.T) {
153153
ref, err := ParseReference("//busybox")
154154
require.NoError(t, err)
155-
img, err := ref.NewImage(&types.SystemContext{RegistriesDirPath: "/this/doesnt/exist", DockerPerHostCertDirPath: "/this/doesnt/exist"})
155+
img, err := ref.NewImage(&types.SystemContext{
156+
RegistriesDirPath: "/this/doesnt/exist",
157+
DockerPerHostCertDirPath: "/this/doesnt/exist",
158+
ArchitectureChoice: "amd64",
159+
OSChoice: "linux",
160+
})
156161
require.NoError(t, err)
157162
defer img.Close()
158163
}

manifest/manifest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var DefaultRequestedManifestMIMETypes = []string{
3535
DockerV2Schema2MediaType,
3636
DockerV2Schema1SignedMediaType,
3737
DockerV2Schema1MediaType,
38-
// DockerV2ListMediaType, // FIXME: Restore this ASAP
38+
DockerV2ListMediaType,
3939
}
4040

4141
// GuessMIMEType guesses MIME type of a manifest and returns it _if it is recognized_, or "" if unknown or unrecognized.

0 commit comments

Comments
 (0)