Skip to main content

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.

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>.

Create an Authentication Token

Create a token to authenticate the Docker client to your registry.

crusoe registry tokens create --alias my-quickstart-token

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.

crusoe registry images list my-nginx-repo --location us-east1-a