1

We have a private harbor registry that's insecure. We use docker client on a centos7 VM to push /pull images. We lost the docker client centos7 VM so have installed a new one. The issue I see is I log into the registry but when I do "docker image list" or "docker images" it doesn't show the images previously loaded. I'm not sure why?

[udmuser1@vtc-spk-auto10 ~]$ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE

If I do a docker load -i image on the new linux VM then docker push I do see the image when doing "docker image list" on the registry.

[udmuser1@vtc-spk-auto10 ~]$ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE harbor01.ims.net/library/f5-fluentd v1.4.2 b96d9e18a71c 9 months ago 495 MB

I'm unclear why I don't see the images that were loaded by the previous linux VM.

Thanks for any input on this.

John

John
  • 13
  • 1
  • 3

4 Answers4

0

The container Registry is a place where you push/pull images to and from.

Your local Docker Client contains only the images that fulfil the criteria:

  1. The image was pulled from a registry
  2. The image was build (on that machine)

The container images you are not synchronized with your registry, you need to explicitly push and pull those images.

Vad1mo
  • 5,156
  • 6
  • 36
  • 65
0

Your local Docker client would show you images that are part of its docker daemon in other words the images present on your client. You would need to setup synchronization if you want similar images on both the ends.

  • Thanks Zeehasham for this feedback – John Jun 06 '22 at 17:04
  • Just a follow up. Is it possible to see the images on the registry from the docker client some way? I thought if I did something like "docker image list harbor01.ims.net " that should show images there instead of local ones? I could synchronize them but there are alot of images and may not have enough space. – John Jun 06 '22 at 17:12
  • Yes you can check the image manifest to see if an image exist on a docker registry, a similar discussion is already available at the link below: https://stackoverflow.com/questions/32113330/check-if-imagetag-combination-already-exists-on-docker-hub You can use `docker manifest inspect` for this purpose, I would suggest you to go through the discussion in above link and choose the solution best suited for your case. – zeehasham jafri Jun 07 '22 at 07:58
0

Your private repository and local machine are two different things. You can't get to the images in your private repository if you lose access to it.

QML
  • 1
0

To list all image repositories that contain at least one tagged image, run this curl command:

curl https://registry.io/v2/_catalog
{"repositories":["alpine","postgres"]}

If there are image repositories in a registry that don't possess a single tag, and instead only possess digests e.g. ubuntu@sha256:ac13c5d2, those will be omitted from the output. If a registry contained ubuntu@sha256:ac13c5d2, alpine:latest, and postgres:15.1, Output from /v2/_catalog would read as {"repositories":["alpine","postgres"]}.

Images can be obtained in a more granular and complete method through use of: https://registry.io/v2/{image}/manifests/{digest} for images with digests https://registry.io/v2/{image}/tags/list for images with tags

Dbercules
  • 629
  • 1
  • 9
  • 26