docker-quickstart
This guide will help you create a Docker Artifact Registry in Harness, configure an upstream proxy, and manage Docker images.
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
- Interactive Guide
- Step-by-Step
- 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-
.
- Your registry name must start with a letter and can include
- Optionally, add a Description and Labels for better organization.
- Click Create Registry to finalize.
This registry will serve as your private Docker registry within Harness.
Configure an Upstream Proxy (Optional)
An upstream proxy allows your registry to fetch Docker images from external sources if they are not available locally.
- Interactive Guides
- Step-by-Step
Create an upstream proxy
- In the Artifact Registry module, click the dropdown next to New Artifact Registry and select Upstream Proxy.
- Choose Docker Registry as the proxy type.
- Click Create Proxy to establish the connection.
Configure the upstream proxy in your registry
- In the Artifact Registry module, select an existing Artifact Registry.
- Select the Configuration tab.
- Under Advanced (Optional), select Configure Upstream.
- Select from the list of compatible proxies to add them to your registry.
- Click Save to save the configuration.
If a Docker image isn’t found in your Harness registry, the upstream proxy fetches it from an external registry like Docker Hub, reducing duplication and improving image resolution.
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:
docker tag your-image:tag <harness-registry-url>/your-image:tag
- Push the image to the Harness registry:
docker push <harness-registry-url>/your-image:tag
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:
docker pull <harness-registry-url>/your-image:tag
This command retrieves the Docker image from your Harness registry to your local environment.
By following this guide, you can effectively set up and manage a Docker Artifact Registry within Harness, streamlining your container image workflows.