You can push images from Docker to a project on the embedded Harbor Registry. Projects in the embedded Harbor Registry correspond to vSphere namespaces on a Supervisor Cluster.
In addition, obtain your user account for which you have write permissions on the namespace that corresponds to the project on Harbor Registry where you want to push images.
docker run hello-world
Hello from Docker! This message shows that your installation appears to be working correctly.
docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest bf756fb1ae65 10 months ago 13.3kB
- Login to Harbor Registry with the vSphere Docker Credential Helper.
docker-credential-vsphere login <container-registry-IP> --user firstname.lastname@example.orgNote: While providing
--user usernameis acceptable for login, you should use the UserPrincipalName (UPN) syntax (
--user email@example.com) to login and use
- 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:
docker push <container-registry-IP>/<namespace-name>/<image_name>For example:
docker push 10.179.145.77/tkgs-cluster-ns/hello-world:latestExpected result.
The push refers to repository [10.179.145.77/tkgs-cluster-ns/hello-world] 9c27e219663c: Pushed latest: digest: sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042 size: 525
- Verify that the image is now available in the embedded Harbor Registry.
- Log In to the Embedded Harbor Registry Console
- Click the project link at the .
- Select the Repositories tab.
- You should see the image that you pushed to the registry is present, in the form
namespace/image-name, such as
- Select this image and you see the
latesttag and other metadata.
- Navigate back to the Repositories tab.
- Select the Push Image Docker Command drop down menu. The commands to tag and push images to this repository are provided to you.
docker tag busybox:latest <container-registry-IP>/<namespace-name>/busybox:latest docker push <container-registry-IP>/busybox/busybox:latest
What to do next
Deploy vSphere Pods by using images from the Harbor registry. See Deploy an Application to a vSphere Pod Using the Embedded Harbor Registry.