I have a repository on DockerHub, which I have configured to hook up directly with my GitHub repo, so that a git commit will trigger the build of the Docker images.
I am looking to build multiple Docker images (e.g. v1, v2 etc) for my product.
Now, I can see that DockerHub gives you the option to configure the "build rules" directly from the portal:
so right now, when I make changes to the /releases/v1/Dockerfile, the build will be triggered automatically.
Cool.
Going forward however, I expect to release /releases/v2/Dockerfile to my GitHub repo, and I would like for v2 to be built automatically as well, without me having to create the "build rule" manually. Is there a way to create a "build rule" programmatically?
I'm looking to call the DockerHub API to create the build rule. I've been through the documentation of the API here https://docs.docker.com/registry/spec/api/ but I couldn't find what I was after.
I would like to end up with:
where v2 was created programmatically and not from the console.

