diff --git a/daemon/mgr/image_utils.go b/daemon/mgr/image_utils.go index ba74efc8d..fb96a62df 100644 --- a/daemon/mgr/image_utils.go +++ b/daemon/mgr/image_utils.go @@ -2,12 +2,16 @@ package mgr import ( "regexp" + "strings" "github.com/alibaba/pouch/pkg/reference" ) // addRegistry add default registry if needed. func (mgr *ImageManager) addRegistry(input string) string { + // Trim the prefix if the input is image ID with "sha256:". + // NOTE: we should make it more elegant and comprehensive. + input = strings.TrimPrefix(input, "sha256:") if isNumericID(input) { return input }