Create an Upstream Proxy
An upstream proxy in Harness enables your artifact registry to automatically fetch and cache artifacts from remote sources when they are not available locally. It acts as an intermediary between your registry and external repositories such as Maven Central or Docker Hub.
The upstream proxy is essential for caching open-source dependencies. During a build, if a required dependency is not already cached, it is retrieved from a public repository and stored in the Upstream Proxy artifact tab. This ensures continuous availability, even if the source repository (e.g. Docker Hub or Maven Central) experiences downtime. Harness’s caching mechanism enhances reliability and efficiency by reducing dependency on external services and safeguarding access to critical artifacts.
Key benefits
- Caching: Faster access to artifacts by storing them locally once fetched.
- Centralization: Consolidate external repositories into one location for easier access.
- Access Control: Enforce your security policies while fetching artifacts.
- Reliability: Reduce dependency on external services by leveraging cached artifacts.
Create an upstream proxy
- Interactive Guide
- Step-by-step
-
Select the dropdown next to + New Artifact Registry, and then select Upstream Proxy.
-
Enter the Upstream Proxy Key. This is the identifier or name for the proxy within Harness and is chosen by you.
allowed charactersThis proxy key must start with a letter and can only contain lowercase alphanumerics,
_
,.
and-
-
For the source, select Docker Hub.
-
Choose your Authentication method. In this case, we only want to use public docker images, so we will select Anonymous.
-
Select Create Upstream Proxy.