To create your container registry, send a POST request to /v2/registry
.
The name
becomes part of the URL for images stored in the registry. For
example, if your registry is called example
, an image in it will have the
URL registry.digitalocean.com/example/image:tag
.
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"name": "example",
"subscription_tier_slug": "basic",
"region": "fra1"
}
resp = client.registry.create(body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.