diff --git a/storage/containers.go b/storage/containers.go index c11c5ec62f..a3ab9c0930 100644 --- a/storage/containers.go +++ b/storage/containers.go @@ -336,7 +336,7 @@ func (r *containerStore) Get(id string) (*Container, error) { } func (r *containerStore) Lookup(name string) (id string, err error) { - if container, ok := r.lookup(id); ok { + if container, ok := r.lookup(name); ok { return container.ID, nil } return "", ErrContainerUnknown diff --git a/storage/images.go b/storage/images.go index 63b6ecba57..8476445bd5 100644 --- a/storage/images.go +++ b/storage/images.go @@ -320,7 +320,7 @@ func (r *imageStore) Get(id string) (*Image, error) { } func (r *imageStore) Lookup(name string) (id string, err error) { - if image, ok := r.lookup(id); ok { + if image, ok := r.lookup(name); ok { return image.ID, nil } return "", ErrImageUnknown