diff --git a/libpod/images/copy_ref.go b/libpod/images/copy_ref.go index fc4371aa..2391a242 100644 --- a/libpod/images/copy_ref.go +++ b/libpod/images/copy_ref.go @@ -59,7 +59,7 @@ type copySource struct { // NewImage creates a new image from the given system context func (c *CopyRef) NewImage(sc *types.SystemContext) (types.Image, error) { - src, err := c.NewImageSource(sc, nil) + src, err := c.NewImageSource(sc) if err != nil { return nil, err } @@ -82,10 +82,9 @@ func selectManifestType(preferred string, acceptable, supported []string) string } // NewImageSource creates a new image source from the given system context and manifest -func (c *CopyRef) NewImageSource(sc *types.SystemContext, manifestTypes []string) (src types.ImageSource, err error) { +func (c *CopyRef) NewImageSource(sc *types.SystemContext) (src types.ImageSource, err error) { // Decide which type of manifest and configuration output we're going to provide. - supportedManifestTypes := []string{v1.MediaTypeImageManifest, docker.V2S2MediaTypeManifest} - manifestType := selectManifestType(c.preferredManifestType, manifestTypes, supportedManifestTypes) + manifestType := selectManifestType(c.preferredManifestType, nil, nil) // If it's not a format we support, return an error. if manifestType != v1.MediaTypeImageManifest && manifestType != docker.V2S2MediaTypeManifest { return nil, errors.Errorf("no supported manifest types (attempted to use %q, only know %q and %q)", diff --git a/pkg/storage/image.go b/pkg/storage/image.go index 32ca1513..5aca3e8f 100644 --- a/pkg/storage/image.go +++ b/pkg/storage/image.go @@ -169,7 +169,7 @@ func (svc *imageService) CanPull(imageName string, options *copy.Options) (bool, if err != nil { return false, err } - rawSource, err := srcRef.NewImageSource(options.SourceCtx, nil) + rawSource, err := srcRef.NewImageSource(options.SourceCtx) if err != nil { return false, err } diff --git a/vendor.conf b/vendor.conf index 81b0b766..5b659483 100644 --- a/vendor.conf +++ b/vendor.conf @@ -5,7 +5,7 @@ k8s.io/apimachinery release-1.7 https://github.com/kubernetes/apimachinery k8s.io/apiserver release-1.7 https://github.com/kubernetes/apiserver # github.com/sirupsen/logrus v1.0.0 -github.com/containers/image abb4cd79e3427bb2b02a5930814ef2ad19983c24 +github.com/containers/image d17474f39dae1da15ab9ae033d57ebefcf62f77a github.com/docker/docker-credential-helpers d68f9aeca33f5fd3f08eeae5e9d175edf4e731d1 github.com/ostreedev/ostree-go master github.com/containers/storage f8cff0727cf0802f0752ca58d2c05ec5270a47d5 diff --git a/vendor/github.com/containers/image/copy/copy.go b/vendor/github.com/containers/image/copy/copy.go index bb52ea76..c7af5ed1 100644 --- a/vendor/github.com/containers/image/copy/copy.go +++ b/vendor/github.com/containers/image/copy/copy.go @@ -129,9 +129,7 @@ func Image(policyContext *signature.PolicyContext, destRef, srcRef types.ImageRe } }() - destSupportedManifestMIMETypes := dest.SupportedManifestMIMETypes() - - rawSource, err := srcRef.NewImageSource(options.SourceCtx, destSupportedManifestMIMETypes) + rawSource, err := srcRef.NewImageSource(options.SourceCtx) if err != nil { return errors.Wrapf(err, "Error initializing source %s", transports.ImageName(srcRef)) } @@ -195,7 +193,7 @@ func Image(policyContext *signature.PolicyContext, destRef, srcRef types.ImageRe // We compute preferredManifestMIMEType only to show it in error messages. // Without having to add this context in an error message, we would be happy enough to know only that no conversion is needed. - preferredManifestMIMEType, otherManifestMIMETypeCandidates, err := determineManifestConversion(&manifestUpdates, src, destSupportedManifestMIMETypes, canModifyManifest) + preferredManifestMIMEType, otherManifestMIMETypeCandidates, err := determineManifestConversion(&manifestUpdates, src, dest.SupportedManifestMIMETypes(), canModifyManifest) if err != nil { return err } diff --git a/vendor/github.com/containers/image/directory/directory_transport.go b/vendor/github.com/containers/image/directory/directory_transport.go index 34f74289..b9ce01a2 100644 --- a/vendor/github.com/containers/image/directory/directory_transport.go +++ b/vendor/github.com/containers/image/directory/directory_transport.go @@ -143,11 +143,9 @@ func (ref dirReference) NewImage(ctx *types.SystemContext) (types.Image, error) return image.FromSource(src) } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref dirReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func (ref dirReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { return newImageSource(ref), nil } diff --git a/vendor/github.com/containers/image/docker/archive/transport.go b/vendor/github.com/containers/image/docker/archive/transport.go index 59c68c3b..f38d4ace 100644 --- a/vendor/github.com/containers/image/docker/archive/transport.go +++ b/vendor/github.com/containers/image/docker/archive/transport.go @@ -134,11 +134,9 @@ func (ref archiveReference) NewImage(ctx *types.SystemContext) (types.Image, err return ctrImage.FromSource(src) } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref archiveReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func (ref archiveReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { return newImageSource(ctx, ref), nil } diff --git a/vendor/github.com/containers/image/docker/daemon/daemon_transport.go b/vendor/github.com/containers/image/docker/daemon/daemon_transport.go index 41ccd1f1..41be1b2d 100644 --- a/vendor/github.com/containers/image/docker/daemon/daemon_transport.go +++ b/vendor/github.com/containers/image/docker/daemon/daemon_transport.go @@ -161,11 +161,9 @@ func (ref daemonReference) NewImage(ctx *types.SystemContext) (types.Image, erro return image.FromSource(src) } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref daemonReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func (ref daemonReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { return newImageSource(ctx, ref) } diff --git a/vendor/github.com/containers/image/docker/docker_image.go b/vendor/github.com/containers/image/docker/docker_image.go index 992d9203..8be35b73 100644 --- a/vendor/github.com/containers/image/docker/docker_image.go +++ b/vendor/github.com/containers/image/docker/docker_image.go @@ -23,7 +23,7 @@ type Image struct { // a client to the registry hosting the given image. // The caller must call .Close() on the returned Image. func newImage(ctx *types.SystemContext, ref dockerReference) (types.Image, error) { - s, err := newImageSource(ctx, ref, nil) + s, err := newImageSource(ctx, ref) if err != nil { return nil, err } diff --git a/vendor/github.com/containers/image/docker/docker_image_dest.go b/vendor/github.com/containers/image/docker/docker_image_dest.go index 68404bda..ee2af92b 100644 --- a/vendor/github.com/containers/image/docker/docker_image_dest.go +++ b/vendor/github.com/containers/image/docker/docker_image_dest.go @@ -20,25 +20,11 @@ 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" ) -var manifestMIMETypes = []string{ - // TODO(runcom): we'll add OCI as part of another PR here - manifest.DockerV2Schema2MediaType, - manifest.DockerV2Schema1SignedMediaType, - manifest.DockerV2Schema1MediaType, -} - -func supportedManifestMIMETypesMap() map[string]bool { - m := make(map[string]bool, len(manifestMIMETypes)) - for _, mt := range manifestMIMETypes { - m[mt] = true - } - return m -} - type dockerImageDestination struct { ref dockerReference c *dockerClient @@ -70,7 +56,12 @@ func (d *dockerImageDestination) Close() error { } func (d *dockerImageDestination) SupportedManifestMIMETypes() []string { - return manifestMIMETypes + return []string{ + imgspecv1.MediaTypeImageManifest, + manifest.DockerV2Schema2MediaType, + manifest.DockerV2Schema1SignedMediaType, + manifest.DockerV2Schema1MediaType, + } } // SupportsSignatures returns an error (to be displayed to the user) if the destination certainly can't store signatures. diff --git a/vendor/github.com/containers/image/docker/docker_image_src.go b/vendor/github.com/containers/image/docker/docker_image_src.go index 88607210..e574305b 100644 --- a/vendor/github.com/containers/image/docker/docker_image_src.go +++ b/vendor/github.com/containers/image/docker/docker_image_src.go @@ -21,41 +21,23 @@ import ( ) type dockerImageSource struct { - ref dockerReference - requestedManifestMIMETypes []string - c *dockerClient + ref dockerReference + c *dockerClient // State cachedManifest []byte // nil if not loaded yet cachedManifestMIMEType string // Only valid if cachedManifest != nil } -// newImageSource creates a new ImageSource for the specified image reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// newImageSource creates a new ImageSource for the specified image reference. // The caller must call .Close() on the returned ImageSource. -func newImageSource(ctx *types.SystemContext, ref dockerReference, requestedManifestMIMETypes []string) (*dockerImageSource, error) { +func newImageSource(ctx *types.SystemContext, ref dockerReference) (*dockerImageSource, error) { c, err := newDockerClient(ctx, ref, false, "pull") if err != nil { return nil, err } - if requestedManifestMIMETypes == nil { - requestedManifestMIMETypes = manifest.DefaultRequestedManifestMIMETypes - } - supportedMIMEs := supportedManifestMIMETypesMap() - acceptableRequestedMIMEs := false - for _, mtrequested := range requestedManifestMIMETypes { - if supportedMIMEs[mtrequested] { - acceptableRequestedMIMEs = true - break - } - } - if !acceptableRequestedMIMEs { - requestedManifestMIMETypes = manifest.DefaultRequestedManifestMIMETypes - } return &dockerImageSource{ ref: ref, - requestedManifestMIMETypes: requestedManifestMIMETypes, - c: c, + c: c, }, nil } @@ -96,7 +78,7 @@ func (s *dockerImageSource) GetManifest() ([]byte, string, error) { func (s *dockerImageSource) fetchManifest(ctx context.Context, tagOrDigest string) ([]byte, string, error) { path := fmt.Sprintf(manifestPath, reference.Path(s.ref.ref), tagOrDigest) headers := make(map[string][]string) - headers["Accept"] = s.requestedManifestMIMETypes + headers["Accept"] = manifest.DefaultRequestedManifestMIMETypes res, err := s.c.makeRequest(ctx, "GET", path, headers, nil) if err != nil { return nil, "", err diff --git a/vendor/github.com/containers/image/docker/docker_transport.go b/vendor/github.com/containers/image/docker/docker_transport.go index 15d68e99..1d67cc4f 100644 --- a/vendor/github.com/containers/image/docker/docker_transport.go +++ b/vendor/github.com/containers/image/docker/docker_transport.go @@ -130,12 +130,10 @@ func (ref dockerReference) NewImage(ctx *types.SystemContext) (types.Image, erro return newImage(ctx, ref) } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref dockerReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { - return newImageSource(ctx, ref, requestedManifestMIMETypes) +func (ref dockerReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { + return newImageSource(ctx, ref) } // NewImageDestination returns a types.ImageDestination for this reference. diff --git a/vendor/github.com/containers/image/manifest/manifest.go b/vendor/github.com/containers/image/manifest/manifest.go index 605bab1d..e329ee57 100644 --- a/vendor/github.com/containers/image/manifest/manifest.go +++ b/vendor/github.com/containers/image/manifest/manifest.go @@ -35,7 +35,7 @@ var DefaultRequestedManifestMIMETypes = []string{ DockerV2Schema2MediaType, DockerV2Schema1SignedMediaType, DockerV2Schema1MediaType, - DockerV2ListMediaType, + // DockerV2ListMediaType, // FIXME: Restore this ASAP } // GuessMIMEType guesses MIME type of a manifest and returns it _if it is recognized_, or "" if unknown or unrecognized. diff --git a/vendor/github.com/containers/image/oci/archive/oci_src.go b/vendor/github.com/containers/image/oci/archive/oci_src.go index 9aa16a3d..8644202f 100644 --- a/vendor/github.com/containers/image/oci/archive/oci_src.go +++ b/vendor/github.com/containers/image/oci/archive/oci_src.go @@ -19,13 +19,13 @@ type ociArchiveImageSource struct { // newImageSource returns an ImageSource for reading from an existing directory. // newImageSource untars the file and saves it in a temp directory -func newImageSource(ctx *types.SystemContext, ref ociArchiveReference, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func newImageSource(ctx *types.SystemContext, ref ociArchiveReference) (types.ImageSource, error) { tempDirRef, err := createUntarTempDir(ref) if err != nil { return nil, errors.Wrap(err, "error creating temp directory") } - unpackedSrc, err := tempDirRef.ociRefExtracted.NewImageSource(ctx, requestedManifestMIMETypes) + unpackedSrc, err := tempDirRef.ociRefExtracted.NewImageSource(ctx) if err != nil { if err := tempDirRef.deleteTempDir(); err != nil { return nil, errors.Wrapf(err, "error deleting temp directory", tempDirRef.tempDirectory) diff --git a/vendor/github.com/containers/image/oci/archive/oci_transport.go b/vendor/github.com/containers/image/oci/archive/oci_transport.go index da68b031..31b19198 100644 --- a/vendor/github.com/containers/image/oci/archive/oci_transport.go +++ b/vendor/github.com/containers/image/oci/archive/oci_transport.go @@ -157,18 +157,17 @@ func (ref ociArchiveReference) PolicyConfigurationNamespaces() []string { // NewImage returns a types.Image for this reference, possibly specialized for this ImageTransport. // The caller must call .Close() on the returned Image. func (ref ociArchiveReference) NewImage(ctx *types.SystemContext) (types.Image, error) { - src, err := newImageSource(ctx, ref, nil) + src, err := newImageSource(ctx, ref) if err != nil { return nil, err } return image.FromSource(src) } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref ociArchiveReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { - return newImageSource(ctx, ref, requestedManifestMIMETypes) +func (ref ociArchiveReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { + return newImageSource(ctx, ref) } // NewImageDestination returns a types.ImageDestination for this reference. diff --git a/vendor/github.com/containers/image/oci/layout/oci_transport.go b/vendor/github.com/containers/image/oci/layout/oci_transport.go index 1406dd18..7fd826f4 100644 --- a/vendor/github.com/containers/image/oci/layout/oci_transport.go +++ b/vendor/github.com/containers/image/oci/layout/oci_transport.go @@ -241,11 +241,9 @@ func LoadManifestDescriptor(imgRef types.ImageReference) (imgspecv1.Descriptor, return ociRef.getManifestDescriptor() } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref ociReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func (ref ociReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { return newImageSource(ref) } diff --git a/vendor/github.com/containers/image/openshift/openshift.go b/vendor/github.com/containers/image/openshift/openshift.go index 19ad2537..0117f2e0 100644 --- a/vendor/github.com/containers/image/openshift/openshift.go +++ b/vendor/github.com/containers/image/openshift/openshift.go @@ -162,18 +162,15 @@ func (c *openshiftClient) convertDockerImageReference(ref string) (string, error type openshiftImageSource struct { client *openshiftClient // Values specific to this image - ctx *types.SystemContext - requestedManifestMIMETypes []string + ctx *types.SystemContext // State docker types.ImageSource // The Docker Registry endpoint, or nil if not resolved yet imageStreamImageName string // Resolved image identifier, or "" if not known yet } -// newImageSource creates a new ImageSource for the specified reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// newImageSource creates a new ImageSource for the specified reference. // The caller must call .Close() on the returned ImageSource. -func newImageSource(ctx *types.SystemContext, ref openshiftReference, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func newImageSource(ctx *types.SystemContext, ref openshiftReference) (types.ImageSource, error) { client, err := newOpenshiftClient(ref) if err != nil { return nil, err @@ -182,7 +179,6 @@ func newImageSource(ctx *types.SystemContext, ref openshiftReference, requestedM return &openshiftImageSource{ client: client, ctx: ctx, - requestedManifestMIMETypes: requestedManifestMIMETypes, }, nil } @@ -286,7 +282,7 @@ func (s *openshiftImageSource) ensureImageIsResolved(ctx context.Context) error if err != nil { return err } - d, err := dockerRef.NewImageSource(s.ctx, s.requestedManifestMIMETypes) + d, err := dockerRef.NewImageSource(s.ctx) if err != nil { return err } diff --git a/vendor/github.com/containers/image/openshift/openshift_transport.go b/vendor/github.com/containers/image/openshift/openshift_transport.go index 108e1102..7db35d96 100644 --- a/vendor/github.com/containers/image/openshift/openshift_transport.go +++ b/vendor/github.com/containers/image/openshift/openshift_transport.go @@ -130,19 +130,17 @@ func (ref openshiftReference) PolicyConfigurationNamespaces() []string { // NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource, // verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage. func (ref openshiftReference) NewImage(ctx *types.SystemContext) (types.Image, error) { - src, err := newImageSource(ctx, ref, nil) + src, err := newImageSource(ctx, ref) if err != nil { return nil, err } return genericImage.FromSource(src) } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref openshiftReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { - return newImageSource(ctx, ref, requestedManifestMIMETypes) +func (ref openshiftReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { + return newImageSource(ctx, ref) } // NewImageDestination returns a types.ImageDestination for this reference. diff --git a/vendor/github.com/containers/image/ostree/ostree_dest.go b/vendor/github.com/containers/image/ostree/ostree_dest.go index f03ef65a..885297bd 100644 --- a/vendor/github.com/containers/image/ostree/ostree_dest.go +++ b/vendor/github.com/containers/image/ostree/ostree_dest.go @@ -153,7 +153,7 @@ func fixFiles(dir string, usermode bool) error { if err != nil { return err } - } else if usermode && (info.Mode().IsRegular() || (info.Mode()&os.ModeSymlink) != 0) { + } else if usermode && (info.Mode().IsRegular()) { if err := os.Chmod(fullpath, info.Mode()|0600); err != nil { return err } diff --git a/vendor/github.com/containers/image/ostree/ostree_transport.go b/vendor/github.com/containers/image/ostree/ostree_transport.go index defdc63c..0de74a71 100644 --- a/vendor/github.com/containers/image/ostree/ostree_transport.go +++ b/vendor/github.com/containers/image/ostree/ostree_transport.go @@ -84,24 +84,15 @@ func NewReference(image string, repo string) (types.ImageReference, error) { // image is not _really_ in a containers/image/docker/reference format; // as far as the libOSTree ociimage/* namespace is concerned, it is more or // less an arbitrary string with an implied tag. - // We use the reference.* parsers basically for the default tag name in - // reference.TagNameOnly, and incidentally for some character set and length - // restrictions. - var ostreeImage reference.Named - s := strings.SplitN(image, ":", 2) - - named, err := reference.WithName(s[0]) + // Parse the image using reference.ParseNormalizedNamed so that we can + // check whether the images has a tag specified and we can add ":latest" if needed + ostreeImage, err := reference.ParseNormalizedNamed(image) if err != nil { return nil, err } - if len(s) == 1 { - ostreeImage = reference.TagNameOnly(named) - } else { - ostreeImage, err = reference.WithTag(named, s[1]) - if err != nil { - return nil, err - } + if reference.IsNameOnly(ostreeImage) { + image = image + ":latest" } resolved, err := explicitfilepath.ResolvePathToFullyExplicit(repo) @@ -123,8 +114,8 @@ func NewReference(image string, repo string) (types.ImageReference, error) { } return ostreeReference{ - image: ostreeImage.String(), - branchName: encodeOStreeRef(ostreeImage.String()), + image: image, + branchName: encodeOStreeRef(image), repo: resolved, }, nil } @@ -185,11 +176,9 @@ func (ref ostreeReference) NewImage(ctx *types.SystemContext) (types.Image, erro return nil, errors.New("Reading ostree: images is currently not supported") } -// NewImageSource returns a types.ImageSource for this reference, -// asking the backend to use a manifest from requestedManifestMIMETypes if possible. -// nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. +// NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. -func (ref ostreeReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func (ref ostreeReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { return nil, errors.New("Reading ostree: images is currently not supported") } diff --git a/vendor/github.com/containers/image/storage/storage_reference.go b/vendor/github.com/containers/image/storage/storage_reference.go index 674330b4..ded58705 100644 --- a/vendor/github.com/containers/image/storage/storage_reference.go +++ b/vendor/github.com/containers/image/storage/storage_reference.go @@ -154,7 +154,7 @@ func (s storageReference) DeleteImage(ctx *types.SystemContext) error { return err } -func (s storageReference) NewImageSource(ctx *types.SystemContext, requestedManifestMIMETypes []string) (types.ImageSource, error) { +func (s storageReference) NewImageSource(ctx *types.SystemContext) (types.ImageSource, error) { return newImageSource(s) } diff --git a/vendor/github.com/containers/image/types/types.go b/vendor/github.com/containers/image/types/types.go index 78afe09f..a0424106 100644 --- a/vendor/github.com/containers/image/types/types.go +++ b/vendor/github.com/containers/image/types/types.go @@ -78,11 +78,9 @@ type ImageReference interface { // NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource, // verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage. NewImage(ctx *SystemContext) (Image, error) - // NewImageSource returns a types.ImageSource for this reference, - // asking the backend to use a manifest from requestedManifestMIMETypes if possible. - // nil requestedManifestMIMETypes means manifest.DefaultRequestedManifestMIMETypes. + // NewImageSource returns a types.ImageSource for this reference. // The caller must call .Close() on the returned ImageSource. - NewImageSource(ctx *SystemContext, requestedManifestMIMETypes []string) (ImageSource, error) + NewImageSource(ctx *SystemContext) (ImageSource, error) // NewImageDestination returns a types.ImageDestination for this reference. // The caller must call .Close() on the returned ImageDestination. NewImageDestination(ctx *SystemContext) (ImageDestination, error) @@ -304,6 +302,8 @@ type SystemContext struct { SignaturePolicyPath string // If not "", overrides the system's default path for registries.d (Docker signature storage configuration) RegistriesDirPath string + // Path to the system-wide registries configuration file + SystemRegistriesConfPath string // === docker.Transport overrides === // If not "", a directory containing a CA certificate (ending with ".crt"),