summaryrefslogtreecommitdiff
path: root/client/image_tag.go
diff options
context:
space:
mode:
authorAaron Lehmann <aaron.lehmann@docker.com>2017-04-11 13:37:04 -0700
committerAaron Lehmann <aaron.lehmann@docker.com>2017-04-11 13:37:04 -0700
commit4a0704cdbd1805d0d9ef046eb62a77352f1feab0 (patch)
tree29e4ffa2c555e8dbc12c3b575157a70fa8e269de /client/image_tag.go
parent8a8c1961b58ef687e4a07002bdf1be4784ff7142 (diff)
downloaddocker-4a0704cdbd1805d0d9ef046eb62a77352f1feab0.tar.gz
client: Allow hex strings as source references for ImageTag
The source of a tag operation is allowed to be a 64-character hex string. This means it should use ParseAnyReference for validation instead of ParseNormalizedNamed. This fixes a regression that happened in 17.04. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Diffstat (limited to 'client/image_tag.go')
-rw-r--r--client/image_tag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/image_tag.go b/client/image_tag.go
index 35abe332bf..8924f71eb3 100644
--- a/client/image_tag.go
+++ b/client/image_tag.go
@@ -10,7 +10,7 @@ import (
// ImageTag tags an image in the docker host
func (cli *Client) ImageTag(ctx context.Context, source, target string) error {
- if _, err := reference.ParseNormalizedNamed(source); err != nil {
+ if _, err := reference.ParseAnyReference(source); err != nil {
return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", source)
}