Alpine
Use an Alpine registry to host private Alpine Linux packages and serve them to Alpine Package Keeper (APK).
Before you begin
Ensure you have the Alpine Package Keeper (
apk) and Harness CLI installed on your local machine.Access to a Harness account with appropriate permissions to create registries and connectors.
Create an Alpine artifact registry
Go to the Artifact Registry module in your Harness project.
Click New Artifact Registry.
In the Registry Type list, select Alpine.
Enter a Registry Name.
Optionally, add a Description and Labels for better organization.
Select Create Registry to finalize.
Configure an upstream proxy (optional)
An upstream proxy allows your registry to fetch Alpine packages from external APK sources when they are not available locally. The default upstream is the Alpine Linux package CDN.
Create an upstream proxy
In the Artifact Registry module, select the dropdown next to New Artifact Registry and select Upstream Proxy.
Select Alpine as the proxy type.
Enter an Upstream Proxy Key.
Optionally, add a Description and Labels.
Select your Source:
Alpine Linux
Custom
If you choose Custom, enter your Remote Registry URL. The URL must point to the parent of the Alpine version folders (for example,
https://dl-cdn.alpinelinux.org/alpine, wherehttps://dl-cdn.alpinelinux.org/alpine/v3.21/main/contains package indexes). If you use another Alpine mirror or private repository, verify the path ends at that parent level, not at a version, component, or architecture subdirectory.Choose your Authentication method (
Anonymousby default for public Alpine mirrors).Choose visibility between Public and Private. By default, the visibility is set to Private.
Click Create Upstream Proxy to establish the connection.
Configure the upstream proxy in your registry
In the Artifact Registry module, select an existing Alpine Artifact Registry.
Go to the Configuration tab.
In the Advanced (Optional) section, click Configure Upstream.
Select from the list of compatible proxies to add them to your registry.
Select Save to save the configuration.
Set up the APK client
In your Harness Alpine Artifact Registry, click Set Up Client and follow the instructions to configure APK to use the registry.
1. Generate identity token
In your Harness Alpine Artifact Registry, click Set Up Client.
Click Generate Token to generate an identity token.
2. Configure apk repository
Point apk at this registry.
Add the registry to /etc/apk/repositories:
Refresh the index (allow untrusted indexes):
3. Install a package
Use apk with --allow-untrusted for unsigned indexes.
Last updated
Was this helpful?