CODEFRESH.IO DOCUMENTATION

Codefresh is a Docker-native CI/CD platform.
Instantly build, test and deploy Docker images.

Push image to a Docker registry

With Codefresh, you can automatically push your build images to your Docker registry.

You select this option when you configure your service.

What's a Docker registry? Learn more at the Docker Documentation Center

1. Access Your Service

Procedure:

  1. Click the Services view icon to display the service you created.
  2. Click the Gear icon on the service profile.
Services view (click image to enlarge)

Services view (click image to enlarge)

Result:

You are directed to the Pipelines tab of the Services view.

2. Name Your Image

Procedure:

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

Notice that the name you define is important and you should provide a name that will be accepted by your Docker registry.

Define the image name (click image to enlarge)

Define the image name (click image to enlarge)

3. Configure Your Registry Settings

Scroll to the Push to Docker registry section.
If you haven't configured your Docker Hub registry credentials you are prompted to do so.

Navigate to Integration page (click image to enlarge)

Navigate to Integration page (click image to enlarge)

On the integration page, enter your Docker Hub credentials and click SAVE.
Now, navigate back to your service's configuration page.

Setting credentials (click image to enlarge)

Setting credentials (click image to enlarge)

Want to push your image to a different registry? Check out our Docker Registry integration documentation .

4. Enable Automatic Push to Your Registry

Procedure:

  1. Scroll to the Push to Docker Registry section and click on the Docker icon.
  2. On the bottom of the service configuration page, click the SAVE button.
Automatic push enabled (click image to enlarge)

Automatic push enabled (click image to enlarge)

5. Trigger a New Build

To trigger a new build, click the BUILD button.
When your image builds, it is automatically pushed to your defined registry.

Trigger a new build (click image to enlarge)

Trigger a new build (click image to enlarge)

Push image to a Docker registry