Docker
Prerequisites
Ensure you have Docker CLI installed and configured on your local machine.
Access to a Harness account with appropriate permissions to create registries and connectors. 
Create a Docker Artifact Registry
Navigate to the Artifact Registry module in your Harness project.
Click on New Artifact Registry.
In the Registry Type dropdown, select Docker Registry.
Provide a Registry Name.
Your registry name must start with a letter and can include
lowercase alphanumerics,_,.and-.
Optionally, add a Description and Labels for better organization.
Choose visibility between Public and Private.
Click Create Registry to finalize.
Configure an Upstream Proxy (Optional)
An upstream proxy allows your registry to fetch Docker images from external sources if they are not available locally.
Create an upstream proxy
1. In the Artifact Registry module, click the dropdown next to **New Artifact Registry** and select **Upstream Proxy**. 2. Choose **Docker Registry** as the proxy type. 3. Click **Create Proxy** to establish the connection.
Configure the upstream proxy in your registry
1. In the Artifact Registry module, select an existing Artifact Registry. 2. Select the **Configuration** tab. 3. Under **Advanced (Optional)**, select **Configure Upstream**. 4. Select from the list of compatible proxies to add them to your registry. 5. Click **Save** to save the configuration.
Push & Pull Docker images
Authenticate the Docker CLI with Harness Registry
In your Harness Docker Artifact Registry, click Setup Client.
Copy the provided docker login command.
Execute the command in your terminal to authenticate your Docker CLI with the Harness registry. 
Push a Docker Image to Harness Registry
Tag your Docker image to match the Harness registry format:
Push the image to the Harness registry:
Replace <harness-registry-url> with the URL of your Harness Docker registry.
Pull a Docker Image from Harness Registry
Ensure you’re authenticated with the Harness registry (see Step 3).
Pull the desired image:
Last updated
Was this helpful?