mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Improve message when pushing a non-existent image
I was confused earlier when I did: ``` docker push localhost.localdomain:1234/foo ``` Because docker told me: ``` No such id: localhost.localdomain:1234/foo ``` I actually had buried in my mind the solution to this, but the error message confused me because I had recently had some fun trying to get the registry working and therefore thought it was telling me that I didn't have an account on the registry. This pull request makes it unambiguous that the error is that the specified image is unknown. /cc @cpuguy83 Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
This commit is contained in:
parent
6700580bbc
commit
3a08bbc4d2
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ func (graph *Graph) Exists(id string) bool {
|
|||
func (graph *Graph) Get(name string) (*image.Image, error) {
|
||||
id, err := graph.idIndex.Get(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("could not find image: %v", err)
|
||||
}
|
||||
img, err := image.LoadImage(graph.ImageRoot(id))
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue