summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-01 22:38:03 +0200
committerGitHub <noreply@github.com>2021-06-01 22:38:03 +0200
commit24b364a230102acb8abdf5724c63153d50f03a6c (patch)
treecd82ce02f962975e4605f773df355de4367d3ff7 /pkg/api/handlers/compat
parentce2b331fefb2ce72cb2fa93c4f3c19d25f79f2a0 (diff)
parentfb4a0c572ed1264ebb12218e8905c4845cb159c5 (diff)
downloadpodman-24b364a230102acb8abdf5724c63153d50f03a6c.tar.gz
podman-24b364a230102acb8abdf5724c63153d50f03a6c.tar.bz2
podman-24b364a230102acb8abdf5724c63153d50f03a6c.zip
Merge pull request #10486 from vrothberg/tag-digest-support
support tag@digest notation
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/containers_create.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index 8e9e1fb39..0b5cbd343 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -71,13 +71,12 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) {
imgNameOrID := newImage.ID()
// if the img had multi names with the same sha256 ID, should use the InputName, not the ID
if len(newImage.Names()) > 1 {
- imageRef, err := utils.ParseDockerReference(resolvedName)
- if err != nil {
+ if err := utils.IsRegistryReference(resolvedName); err != nil {
utils.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest, err)
return
}
// maybe the InputName has no tag, so use full name to display
- imgNameOrID = imageRef.DockerReference().String()
+ imgNameOrID = resolvedName
}
sg := specgen.NewSpecGenerator(imgNameOrID, cliOpts.RootFS)