Configure a private external image registry
POST/accounts/{account_id}/containers/registries
Registers credentials for a supported private external image registry so Containers can pull images from it. This endpoint does not create a registry or upload an image. Public Docker Hub images and images in the Cloudflare managed registry do not require this configuration.
Refer to Image management for supported registries and instructions for storing registry credentials.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Configure a private external image registry
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/containers/registries \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"auth": {
"private_credential": {
"secret_name": "API_KEY",
"store_id": "14758f1afd44c09b7992073ccf00b43d"
},
"public_credential": "example-user"
},
"domain": "docker.io",
"kind": "ECR"
}'{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"created_at": "2021-04-01T12:32:41.488Z",
"domain": "docker.io",
"kind": "ECR",
"public_key": "public_key"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"result": {
"created_at": "2021-04-01T12:32:41.488Z",
"domain": "docker.io",
"kind": "ECR",
"public_key": "public_key"
},
"success": true
}