PhysarumSM / service-registry

Apache License 2.0
0 stars 0 forks source link

First time adding existing image fails #21

Closed t-lin closed 3 years ago

t-lin commented 4 years ago

When adding an existing image from Docker hub, if the image doesn't already exist in the local Docker image cache, then the add operation will fail.

$ ./registry-cli add -use-existing-image perf.conf tlin/p2p-hello-world:0.0.1 hello-world
Pulling existing image
Image pulled successfully
2020/07/11 19:38:04.065625 add.go:197: Error response from daemon: reference does not exist

Subsequent attempt succeeds, since, I'm guessing, the image is cached locally.

$ ./registry-cli add -use-existing-image perf.conf tlin/p2p-hello-world:0.0.1 hello-world
Pulling existing image
Image pulled successfully
Saved image successfully
Hashed image successfully: QmZ7NMwhmL3DUkp4JxJhfRaznWA3nng6eLyoSL8s7eUSVD
hello-world : {ContentHash: QmZ7NMwhmL3DUkp4JxJhfRaznWA3nng6eLyoSL8s7eUSVD, DockerHash: tlin/p2p-hello-world@sha256:a02d66aa883cef8b23de8583144cf46d9ef7be3e7da82076aa70abd24b5fe15c}

...