API to push docker images on Container registry

I was following 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

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


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:

doctl registry login

Use the docker tag command to tag your image with the fully qualified destination path:

docker tag <my-image><my-registry>/<my-image>

Use the docker push command to upload your image:

docker push<my-registry>/<my-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