diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-05-27 13:00:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 13:00:08 -0400 |
commit | 6f28b151b659d2c0a0173f524daf5e128bf526ed (patch) | |
tree | 0b2f1e9b0ee849ffdbe5531f395dfd7fbe2b6c04 /vendor/github.com | |
parent | 06db724d037698753bdd93f8f5a1413e2980714c (diff) | |
parent | 1e456318298271af1b00fd24af67e23a2d2ca2a7 (diff) | |
download | podman-6f28b151b659d2c0a0173f524daf5e128bf526ed.tar.gz podman-6f28b151b659d2c0a0173f524daf5e128bf526ed.tar.bz2 podman-6f28b151b659d2c0a0173f524daf5e128bf526ed.zip |
Merge pull request #10484 from vrothberg/3.2-vendor-common
vendor containers/common@v0.38.5
Diffstat (limited to 'vendor/github.com')
-rw-r--r-- | vendor/github.com/containers/common/libimage/pull.go | 14 | ||||
-rw-r--r-- | vendor/github.com/containers/common/version/version.go | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/vendor/github.com/containers/common/libimage/pull.go b/vendor/github.com/containers/common/libimage/pull.go index d93715279..dc429f727 100644 --- a/vendor/github.com/containers/common/libimage/pull.go +++ b/vendor/github.com/containers/common/libimage/pull.go @@ -52,6 +52,7 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP options = &PullOptions{} } + var possiblyUnqualifiedName string // used for short-name resolution ref, err := alltransports.ParseImageName(name) if err != nil { // If the image clearly refers to a local one, we can look it up directly. @@ -74,6 +75,17 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP return nil, err } ref = dockerRef + possiblyUnqualifiedName = name + } else if ref.Transport().Name() == registryTransport.Transport.Name() { + // Normalize the input if we're referring to the docker + // transport directly. That makes sure that a `docker://fedora` + // will resolve directly to `docker.io/library/fedora:latest` + // and not be subject to short-name resolution. + named := ref.DockerReference() + if named == nil { + return nil, errors.New("internal error: unexpected nil reference") + } + possiblyUnqualifiedName = named.String() } if options.AllTags && ref.Transport().Name() != registryTransport.Transport.Name() { @@ -94,7 +106,7 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP // DOCKER REGISTRY case registryTransport.Transport.Name(): - pulledImages, pullError = r.copyFromRegistry(ctx, ref, strings.TrimPrefix(name, "docker://"), pullPolicy, options) + pulledImages, pullError = r.copyFromRegistry(ctx, ref, possiblyUnqualifiedName, pullPolicy, options) // DOCKER ARCHIVE case dockerArchiveTransport.Transport.Name(): diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go index f6f6d1608..c9e080c8d 100644 --- a/vendor/github.com/containers/common/version/version.go +++ b/vendor/github.com/containers/common/version/version.go @@ -1,4 +1,4 @@ package version // Version is the version of the build. -const Version = "0.38.4" +const Version = "0.38.5" |