зеркало из https://github.com/microsoft/docker.git
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:
Родитель
6700580bbc
Коммит
3a08bbc4d2
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче