Codefresh Docker Registry

When creating Codefresh account you will automatically get access to your Codefresh Registry which stores and lets you distribute docker images.

All images built in Codefresh are automatically pushed to your Codefresh registry.

With Codefresh registry you will be able to:

  • Control where your images are being stored
  • Fully own your images distribution pipeline
  • Integrate image storage and distribution into your in-house development workflow

See bellow, how to use CFCR locally to push/pull/search images.

Generate CFCR Login Token

First, you will need a Codefresh API token. To get it, login into Codefresh and navigate to User Settings. Generate Codefresh Registry Access Token and copy this token from there.

Codefresh Registry Access Token

Use Codefresh Registry Locally

By default, all CF users have permissions to push, pull and search Docker images in every user CF account.

Text

# login to CFCR
docker login r.cfcr.io -u CF_USER_NAME -p CFCR_LOGIN_TOKEN
# push Docker image
docker push r.cfcr.io/CF_ACCOUNT/ANY_IMAGE:ANY_TAG
# pull Docker image
docker pull r.cfcr.io/CF_ACCOUNT/ANY_IMAGE:ANY_TAG
CF_USER_NAME Your username in Codefresh
CFCR_LOGIN_TOKEN CFCR Login Token that was generated in the previous step
CF_ACCOUNT Name of your account in Codefresh
ANY_IMAGE Image name
ANY_TAG Tag of your image

Use Codefresh Registry in codefresh

To integrate with Codefresh Registry, first select Codefresh Registry from the new registry drop down and then provide the following

  • Registry Name - A unique name for this configuration
  • Username - Your username in Codefresh
  • Access token - Your generated access token

Codefresh Docker registry registry

Images built in Codefresh

  • All images built in Codefresh are automatically pushed to the Codefresh registry after the build.
  • Distinguishing between images which were pushed to the registry and old images which were not pushed (Turquoise tags for new and Grey tags for old).
  • To push the old images to the Codefresh Registry you can do it on the tab Images, just click on the button Promote image and specify the image name in the format r.cfcr.io/<ACCOUNT>/<IMAGE>

Pull image from Codefresh Registry

In the tab Images for each image, you can find the command to pull this image from Codefresh Registry.

Codefresh Pull Images

Login To CFCR In order to pull images from Codefresh’s registry you must first login. Use this Docker command to authenticate.

docker login

docker login -u <USERNAME> -p <ACCESS_TOKEN> r.cfcr.io

Pull Docker Image Use this Docker pull command to download the image

docker pull

docker pull r.cfcr.io/<ACCOUNT>/<IMAGE>:<TAG>

See also

Accessing Codefresh Docker registry from your Kubernetes cluster