I was following https://docs.digitalocean.com/reference/api/api-reference. As per my understanding, There can be a single registry, inside which I can create multiple repositories
I am confused whether “image” and “repository” mean the same ?
Also, I want to push a few docker images which are already built on my local. Which API can be useful for that purpose, because I couldn’t find any API saying “Create repository”
Please let me know if I have a misconception here
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello,
The API allows you to manage your Docker registry, but in order to push a Docker image to your Registry, you could follow these steps here:
Install
doctl
and authenticate it with an API tokenUse the registry login command to authenticate Docker with your registry:
Use the docker tag command to tag your image with the fully qualified destination path:
Use the docker push command to upload your image:
If you push a new image using an existing tag, the tag gets updated but the old image is still accessible by its digest and takes up space in your registry.
To reduce your storage usage, you can delete the untagged images and then run garbage collection.
Best, Bobby