Add a registry via the API?

I am trying to automate this part of the Rancher setup and was wondering if it is possible to create/configure a Docker registry via the API?

The UI is completely client side, everything can be done through the API.

Ah yes that is exactly what I was looking for. Thank you sir!

So I am able to create a registry

-H ‘Accept: application/json’
-H ‘Content-Type: application/json’
-d ‘{“name”:“Test”, “serverAddress”:“”}’

It shows up in my list of registries. But I can’t figure out how configure Dockerhub credentials? Would that be another API call? I apologize, I’m not very good with API’s.

I think I got it. It must be this -

1 Like