Connect to Harness Container Image Registry Using Docker Connector

Updated 1 month ago by Manish Jaiswal

By default, at CIE Pipeline runtime, Harness pulls certain images from public Docker Hub repos. These images are only used for backend processes. At runtime, the Harness Delegate makes an outbound connection to the public repo and pulls the images.

If you do not want the Harness Delegate to pull images from a public repo for security reasons, you can add a special Harness Connector to your Harness account, and the Delegate will pull these images from the Harness Container Image Registry only.

Since you and the Harness Delegate are already connected to Harness securely, there are no additional connections to worry about.

This topic explains how to set up the account-level Docker Connector to connect to the Harness Container Image Registry.

In this topic:

Before You Begin

Step 1: Create a Docker Connector in Harness 

You must create the Harness Docker Connector at the Account level. Make sure that you have the Account > Connectors > Create/Edit/View permission for Harness Platform. See Permission Reference for details on the list of permissions.
  1. In Account Settings, Account Resources, click Connectors.

  1. Click New Connector, and under Artifact Repositories click Docker Registry
    The Docker Registry Connector settings appear.
  2. In Name, enter a name for this connector.
    Harness automatically generates the corresponding ID (entity identifier).
    Modify the ID and set it to harnessImage. You must use the Id harnessImage.
    Harness gives precedence to the Connector with the harnessImage identifier, and uses it to pull from the Harness Container Image Registry, as opposed to pulling from DockerHub directly.
  3. Click Continue.

Step 2: Enter Credentials

Select or enter the following options:

Docker Registry URL

Enter the Harness Registry URL: https://app.harness.io/registry

Provider Type

Select Other (Docker V2 compliant)

Authentication

Select Anonymous (no credentials required)

Click Continue.

Step 3: Set Up Delegates

Harness uses Docker Registry Connectors at Pipeline runtime to pull images and perform operations. You can select Any Available Harness Delegate and Harness will select the best Delegate at runtime. For a description of how Harness picks Delegates, see Delegates Overview.

You can use Delegate Tags to select one or more Delegates. For details on Delegate Tags, see Select Delegates with Tags.

If you need to install a Delegate, see Delegate Installation Overview.

Click Save and Continue.

Step 4: Verify Test Connection

Harness tests the credentials you provided using the Delegates you selected.

If the credentials fail, you'll see an error. Click Edit Credentials to modify your credentials.

Click Finish.

You can now run your Pipeline. Harness will now pull images from the Harness Registry at Pipeline runtime using the configured Connector.

If a connector withharnessImage identifier already exists on your Account, you need to update the connector instead of creating a new connector.

See Also


Please Provide Feedback