mirror of
https://github.com/docker/cli.git
synced 2026-09-27 17:56:04 -04:00
Improve the error print of image inspect
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn> Upstream-commit: cc9ed0a31b0656c58ad7953f2c54d46258380443 Component: engine
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package daemon
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/layer"
|
||||
"github.com/docker/docker/reference"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// LookupImage looks up an image by name and returns it as an ImageInspect
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
func (daemon *Daemon) LookupImage(name string) (*types.ImageInspect, error) {
|
||||
img, err := daemon.GetImage(name)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("No such image: %s", name)
|
||||
return nil, errors.Wrapf(err, "no such image: %s", name)
|
||||
}
|
||||
|
||||
refs := daemon.referenceStore.References(img.ID().Digest())
|
||||
|
||||
Reference in New Issue
Block a user