Push an image

Using the Codefresh UI to push Docker images to a Registry

In Codefresh there are several ways that you can use to push Docker images to a registry:

  1. By using the graphical pipeline steps as explained in this page
  2. By using the push step in a YAML pipeline
  3. By promoting an existing image to another registry

Notice that all successful builds automatically push their image to built-in Codefresh registry. If you use only this internal registry all push steps are optional (they are needed only for external registries).

Using the graphical steps for image pushing

With Codefresh, you can automatically push your build images to your Docker registry. First follow the instructions for connecting your external registry.

Access Your Pipeline

  1. Navigate to the Repositories view and find your repository.
  1. Click the Gear icon to navigate to the Pipelines view.

Viewing the pipelines of a repository

Viewing the pipelines of a repository

You will see all pipelines connected to this repository. Select the pipeline that you want to edit.

Name your Docker image

  1. Scroll down and navigate to the Build and Unit Test section.
  1. In the Image Name text box, type a name for your image.

Entering name of the docker image

Entering name of the docker image

The name you provide must be valid by your Docker registry. For example Dockerhub requires your image to be tagged with your Dockerhub username before it can be pushed.

Select Your Registry

  1. Scroll down to the Push to Docker registry section.
  1. Select your configured registry.

Choosing the external registry

Choosing the external registry

Make sure you already have a configured registry. If not refer to the Docker registry integration documentation to connect it to Codefresh first.

Trigger a New Build

To trigger a new build, click the BUILD button.

Starting a new Build

Starting a new Build

Once your image is built, it will automatically be pushed to your external registry.