Explanation
https://docs.docker.com/docker-hub/repos/
Graphical user interface, text, application Description automatically generated

* Registry Service: Developers can store and manage Docker and OCI images using Harbor. Harbor is an open-source container image registry that secures images with role-based access control.
Procedure
* Login to Harbor Registry with the vSphere Docker Credential Helper.
* docker-credential-vsphere login <container-registry-IP> --user
[email protected] Note:While providing --user username is acceptable for login, you should use the UserPrincipalName (UPN) syntax ( --user
[email protected]) to login and use docker push commands.
* Tag the image that you want to push to the project in Harbor Registry with same name as the namespace, where you want to use it:
* docker tag <image-name>[:TAG] <container-registry-IP>/<project-name>/<image-name>[:TAG] For example:
* docker tag hello-world:latest 10.179.145.77/tkgs-cluster-ns/hello-world:latest
* docker images
* REPOSITORY TAG IMAGE ID CREATED SIZE
* 10.179.145.77/tkgs-cluster-ns/hello-world latest bf756fb1ae65 10 months ago 13.3kB
* hello-world latest bf756fb1ae65 10 months ago 13.3kB
* To push an image to a project in Harbor, run the following command:Syntax:
* docker push <container-registry-IP>/<namespace-name>/<image_name>
For example:
* docker push 10.179.145.77/tkgs-cluster-ns/hello-world:latest
Expected result.
* The push refers to repository [10.179.145.77/tkgs-cluster-ns/hello-world]
* 9c27e219663c: Pushed
* latest: digest: sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042 size: 525