Quickstart
Create a Repository
A repository is an abstract folder you create within CCR, often so you can organize your images per team, business function, or deployment environment.
- CLI
- UI
crusoe registry repositories create \
--name my-nginx-repo \
--location us-east1-a \
--mode standard
Your repository URL will be returned. CCR repository URLs follow a standard format of:
registry.<location>.ccr.crusoecloudcompute.com/<repository-name>.<first-8-digits-of-project-id>
.
- Visit the Crusoe Cloud console
- Select the "Registry" tab in the left nav
- Select "Create Repository"
- Select "Standard" mode
- Select "Create"
Your repository URL will be in the header of your repository details page. CCR repository URLs follow a standard format of:
registry.<location>.ccr.crusoecloudcompute.com/<repository-name>.<first-8-digits-of-project-id>
.
Create an Authentication Token
Create a token to authenticate the Docker client to your registry.
- CLI
- UI
crusoe registry tokens create --alias my-quickstart-token
- Visit the Crusoe Cloud console
- Select the "Registry" tab in the left nav
- Select your repository.
- Select "Create Token".
Save the generated token in a secure location; it will not be shown again.
Log in with Docker
Use the docker login
command to authenticate to your registry from your machine. Use your Crusoe account email address as the username, and the token you just created as the password.
docker login registry.us-east1-a.ccr.crusoecloudcompute.com/my-nginx-repo.7hf6et43 \
-u [email protected]
Tag and Push an Image
The following example pulls a standard image from Docker Hub, re-tags it for a CCR repository, and pushes it.
docker pull nginx:latest
docker tag nginx:latest registry.us-east1-a.ccr.crusoecloudcompute.com/my-nginx-repo.7hf6et43/nginx:latest
docker push registry.us-east1-a.ccr.crusoecloudcompute.com/my-nginx-repo.7hf6et43/nginx:latest
Verify the Push
List the images in your repository to confirm the push was successful.
- CLI
- UI
crusoe registry images list my-nginx-repo --location us-east1-a
- Visit the Crusoe Cloud console
- Select the "Registry" tab in the left nav
- Select your repository.
- Ensure your image is listed.