Managing Repositories
A repository is an abstract folder you create within CCR, often so you can organize your images per team, business function, or deployment environment.
Creating a Standard Repository
- CLI
- UI
crusoe registry repositories create \
--name my-nginx-repo \
--location us-east1-a \
--mode standard
- Visit the Crusoe Cloud console
- Select the "Container Registry" tab in the left nav
- Select "Create Repository"
- Select "Standard" mode
- Select "Create"
Your repository URL will be in the header details at the top of the page.
Creating a Pull-Through Cache
A read-only cache for an upstream registry. When you pull an image, it is fetched from the upstream source, stored in your CCR repository, and then served.
Configuring Upstream Providers
When you create a repository in pull-through cache mode, you must specify an upstream registry provider and url, and if applicable, a username and password. Below are instructions for common upstream providers. Any Docker V2-compliant registries not explicitly listed should use provider: docker-registry.
| Registry Provider | Example URL (must start with http or https) | provider | username | password |
|---|---|---|---|---|
| Google Cloud (GAR) | https://<region>-docker.pkg.dev | google-gar | _json_key | Entire service account JSON key file |
| Google Cloud (GCR) | https://gcr.io | google-gcr | _json_key | Entire service account JSON key file |
| AWS ECR (Private) | https://<id>.dkr.ecr.<region>.amazonaws.com | aws-ecr | IAM user's access key ID | IAM user's secret key |
| AWS ECR Public | https://public.ecr.aws | docker-registry | N/A | N/A |
| Docker Hub | https://hub.docker.com | docker-hub | <dockerhub_username> | <personal_access_token> |
| GitHub (GHCR) | https://ghcr.io | github-ghcr | <github_username> | <personal_access_token> |
| Azure (ACR) | https://<name>.azurecr.io | azure-acr | <service_principal_id> or <access_token_name> | <client_secret> or <access_token> |
| GitLab | https://registry.gitlab.com | docker-registry | <gitlab_username> | <personal_access_token> |
| NVIDIA NGC | https://nvcr.io | docker-registry | $oauthtoken | NGC API key |
| Oracle (OCI) | https://<region>.ocir.io | docker-registry | <your-namespace>/<username> | OCI Registry Token |
- CLI
- UI
crusoe registry repositories create \
--name my-dockerhub-cache \
--location us-east1-a \
--mode pull-through-cache \
--upstream-registry \
url=https://hub.docker.com,provider=docker-hub,username=myuser,password=mypass
To see all supported upstream registry providers, use crusoe registry supported providers.
- Visit the Crusoe Cloud console
- Select the "Container Registry" tab in the left nav
- Select "Create Repository"
- Select "Pull-through Cache" mode
- Select your upstream registry provider
- Enter your upstream registry URL and, optionally, your credentials
- Select "Create"
Your repository URL will be in the header details at the top of the page.
Listing and Getting Repository Details
- CLI
- UI
List repositories in your project:
crusoe registry repositories list
Get details, including URL, for a specific repository:
crusoe registry repositories get my-app-repo --location us-east1-a
- Visit the Crusoe Cloud console
- Select the "Container Registry" tab in the left nav to view all repositories
Deleting a Repository
A repository must be empty to be deleted. To delete images, see managing images
- CLI
- UI
crusoe registry repositories delete my-app-repo --location us-east1-a
- Visit the Crusoe Cloud console
- Select the "Container Registry" tab in the left nav
- Click the "Delete" icon next to the repository you wish to delete
Repository URL Structure
CCR repository URLs follow a standard format of:
registry.<location>.ccr.crusoecloudcompute.com/<repository-name>.<first-8-digits-of-project-id>