From 4f9e3061e892d94a83ea1e2e988cd2eff0683520 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 11 Aug 2017 12:03:38 -0400 Subject: [PATCH] docker_image_dest: Add OCI manifests to manifestMIMETypes Since OCI support is in progress for the docker registry, if we have an OCI manifest, we should try uploading it literally to the registry before falling back to converting it to a v2 manifest. Signed-off-by: Owen W. Taylor --- docker/docker_image_dest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/docker_image_dest.go b/docker/docker_image_dest.go index 80fcb365ee..ee2af92b0b 100644 --- a/docker/docker_image_dest.go +++ b/docker/docker_image_dest.go @@ -20,6 +20,7 @@ import ( "github.com/docker/distribution/registry/api/v2" "github.com/docker/distribution/registry/client" "github.com/opencontainers/go-digest" + imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -56,7 +57,7 @@ func (d *dockerImageDestination) Close() error { func (d *dockerImageDestination) SupportedManifestMIMETypes() []string { return []string{ - // TODO(runcom): we'll add OCI as part of another PR here + imgspecv1.MediaTypeImageManifest, manifest.DockerV2Schema2MediaType, manifest.DockerV2Schema1SignedMediaType, manifest.DockerV2Schema1MediaType,