Hi guys, I currently need to push an image into my Dockerhub organization. To do so, this image needs to be stored in a private repository. I know that when pushing the image, Dockerhub creates a public repository for the image in question for versioning purposes by default.
I would like to know if it is possible to define that the repository it is in should be the default when pushing this image, or if there is a method within the DockerHub API to create the repository (via CURL, for example) before pushing the image (I am doing the entire workflow via Github Actions). For this reason, I would not like to have to create the repository via the graphical interface, but rather do everything via a pipeline (which is why I thought about using the DockerHub API).
The Docker Hub API reference can be found in the documentation
If it doesn’z mention creating a repository, it probably doesn’t support it.
If you need that feature, you can try to ask for it in the roadmap
Without trying to question your ways, just out of curiosity, can I ask why creating the private repository from a web browser is not an option? Do you have so many repositories dynamically created? As far as I know, repositories are normally precreated and configured and then multiple images (multiple versions or image variants of the software) is pushed using different tags to the repository dynamically.
I was just informed that you could go to settings and change the default privacy from public to private if you want the repos to be automatically created as private repos.This way you don’t have to use the GUI.