Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CR-5258 Fallback Registry#315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kostis-codefresh merged 1 commit intomasterfromCR-5258-Fallback-Registry
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 49 additions & 47 deletions_docs/integrations/docker-registries.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,34 +25,58 @@ For a different registry choose to configure using the [Other](other-registries)

The registries can either be public or private.

## General configuration
## General Configuration

To configure your registries go to your Account Configuration, by clicking on *Account Settings* on the left sidebar. On the first section called *Integrations* click the *Configure* button next to *Docker Registry*.

{% include image.html
lightbox="true"
file="/images/integrations/codefresh-integrations.png"
url="/images/integrations/codefresh-integrations.png"
alt="Codefresh Account Integration"
{% include image.html
lightbox="true"
file="/images/integrations/codefresh-integrations.png"
url="/images/integrations/codefresh-integrations.png"
alt="Codefresh Account Integration"
max-width="80%" %}

Add a new registry configuration from the drop down.

{% include image.html
lightbox="true"
file="/images/integrations/docker-registries/add-docker-registry.png"
url="/images/integrations/docker-registries/add-docker-registry.png"
alt="Add Docker Registry"
{% include image.html
lightbox="true"
file="/images/integrations/docker-registries/add-docker-registry.png"
url="/images/integrations/docker-registries/add-docker-registry.png"
alt="Add Docker Registry"
max-width="45%" %}

Each configuration must be given a unique name, which you can later reference in a codefresh.yml file.

{% include image.html
lightbox="true"
file="/images/2924d81-registry-name.png"
url="/images/2924d81-registry-name.png"
alt="Specify Docker Registry Name"
{% include image.html
lightbox="true"
file="/images/2924d81-registry-name.png"
url="/images/2924d81-registry-name.png"
alt="Specify Docker Registry Name"
max-width="40%" %}

## Fallback Registry

Codefresh has a feature that allows users to designate a Fallback Registry for docker integrations. If a Codefresh pipeline attempts to pull an image and that image fails for any reason (authorization issue, the registry server is down, etc.), a retry mechanism will attempt to pull it successfully. If this mechanism fails, the Fallback Registry feature provides the opportunity to pull the image from a different registry you have specified.

To define the Fallback Registry, go to Account Settings, Integrations, and select configure for Docker Registries. In the list of registries, edit the integration. Under Advanced Options, you will see a field labeled as Fallback Registry. Select the integration name you’d like to use as your Fallback Registry and then save the integration. You can also specify a Fallback Registry when creating a new integration as long as another integration exists.

## Using an optional repository prefix

Codefresh allows you to setup globally for each supported Registry a prefix string for your Docker images.

This is handy for registries that require a prefix (usually the name of an organization or repository) as you can set it once, instead of having each pipeline using the prefix by itself.

{% include image.html
lightbox="true"
file="/images/integrations/docker-registries/repository-prefix.png"
url="/images/integrations/docker-registries/repository-prefix.png"
alt="Setting a Registry prefix"
caption="Setting a Registry prefix"
max-width="60%"
%}

See more details at [pushing Docker images]({{site.baseurl}}/docs/docker-registries/working-with-docker-registries/#pushing-docker-images)

## Pushing an image

Once your registry configuration is all set up you can start pushing your images to it.
Expand All@@ -66,31 +90,11 @@ push_step:
description: Free text description
candidate: {% raw %}${{build_step}}{% endraw %}
tag: {% raw %}${{CF_BRANCH}}{% endraw %}
registry:<your-registry-configuration-name>
registry: your-registry-configuration-name
{% endhighlight %}

For more details see the [the image pushing example]({{site.baseurl}}/docs/yaml-examples/examples/build-and-push-an-image/).

## Using an optional repository prefix

Codefresh allows you to setup globally for each supported Registry a prefix string for your Docker images.


This is handy for registries that require a prefix (usually the name of an organization or repository) as you can set it once, instead
of having each pipeline using the prefix by itself.

{% include image.html
lightbox="true"
file="/images/integrations/docker-registries/repository-prefix.png"
url="/images/integrations/docker-registries/repository-prefix.png"
alt="Setting a Registry prefix"
caption="Setting a Registry prefix"
max-width="60%"
%}

See more details at [pushing Docker images]({{site.baseurl}}/docs/docker-registries/working-with-docker-registries/#pushing-docker-images)


## Internal caching registry

You can also select a single registry that will serve as your [caching registry]({{site.baseurl}}/docs/configure-ci-cd-pipeline/pipeline-caching/#docker-registry-caching).
Expand All@@ -99,9 +103,9 @@ You can also select a single registry that will serve as your [caching registry]

Codefresh will efficiently use that registry to perform advanced caching logic for your builds

* Codefresh will automatically examine the stored metadata to decide which past image is most relevant for caching purposes
* Codefresh will automatically pull images from this registry for cache purposes
* Codefresh will automatically use that registry for distributed Docker layer caching to make your Docker builds faster
* Codefresh will automatically examine the stored metadata to decide which past image is most relevant for caching purposes
* Codefresh will automatically pull images from this registry for cache purposes
* Codefresh will automatically use that registry for distributed Docker layer caching to make your Docker builds faster

We give you the ability to define a separate registry for caching purposes for the following scenarios

Expand All@@ -117,13 +121,11 @@ Therefore in most cases you should make your main registry your caching registry

If you define more than one registries you can also click the *default* button in the UI to define the registry that will be used in both [build]({{site.baseurl}}/docs/codefresh-yaml/steps/build/) and [push steps]({{site.baseurl}}/docs/codefresh-yaml/steps/push/) if they don't already contain a `registry` property.

Notice that successful [build steps]({{site.baseurl}}/docs/codefresh-yaml/steps/build/) will always push to the default Codefresh registry unless you also define the `disable_push` property.

Notice that successful [build steps]({{site.baseurl}}/docs/codefresh-yaml/steps/build/) will always push to the default Codefresh registry unless you also define the `disable_push` property.

## What to read next


- [Working with Docker registries]({{site.baseurl}}/docs/docker-registries/working-with-docker-registries/)
- [Push pipeline step]({{site.baseurl}}/docs/codefresh-yaml/steps/push/)
- [Pushing docker images with the UI]({{site.baseurl}}/docs/docker-registries/push-image-to-a-docker-registry/)
- [Examples of pushing Docker images]({{site.baseurl}}/docs/yaml-examples/examples/build-and-push-an-image/)
* [Working with Docker registries]({{site.baseurl}}/docs/docker-registries/working-with-docker-registries/)
* [Push pipeline step]({{site.baseurl}}/docs/codefresh-yaml/steps/push/)
* [Pushing docker images with the UI]({{site.baseurl}}/docs/docker-registries/push-image-to-a-docker-registry/)
* [Examples of pushing Docker images]({{site.baseurl}}/docs/yaml-examples/examples/build-and-push-an-image/)
Loading

[8]ページ先頭

©2009-2025 Movatter.jp