Created
November 25, 2015 18:15
-
-
Save duglin/b8d2282d7ac8b091beba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/daemon/daemon.go b/daemon/daemon.go | |
index 6a8d18e..f82bcdb 100644 | |
--- a/daemon/daemon.go | |
+++ b/daemon/daemon.go | |
@@ -1236,6 +1236,10 @@ func (daemon *Daemon) ImageHistory(name string) ([]*types | |
// GetImageID returns an image ID corresponding to the image referred to by | |
// refOrID. | |
func (daemon *Daemon) GetImageID(refOrID string) (image.ID, error) { | |
+ if i := strings.Index(refOrID, ":"); i >= 0 { | |
+ refOrID = refOrID[i+1:] | |
+ } | |
+ | |
// Treat as an ID | |
if id, err := digest.ParseDigest(refOrID); err == nil { | |
return image.ID(id), nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment