Alpine CLI Usage

Alpine CLI Usage

This page describes basic Alpine apk commands to use with Alpine repositories in Nexus Repository.

Before running these commands, configure your Alpine client to use your Nexus Alpine repository. See Configure Alpine with Nexus for more information.

Install Packages

Use an Alpine proxy or group repository when you want Alpine clients to install packages through Nexus Repository.

Update the package index:

apk update

Install a package:

apk add <package-name>

Where <package-name> is the name of the Alpine package you want to install.

For example:

apk add curl

Publish Packages To A Hosted Repository

Use an Alpine hosted repository when you want to store internal .apk packages in Nexus Repository.

Use the following syntax to publish an Alpine package:

curl -X PUT -u <username>:<password> --upload-file <package-file>.apk "https://<nexus-host>/repository/<repository-name>/<alpine-version>/<channel>/<architecture>/<package-file>.apk"

Where,

For example:

curl -X PUT -u admin:admin123 --upload-file my-package-1.0.0-r0.apk "https://example.nexus.com/repository/alpine-hosted/v3.19/main/x86_64/my-package-1.0.0-r0.apk"

Remove Packages From A Hosted Repository

Use the following syntax to remove a package from an Alpine hosted repository:

curl -X DELETE -u <username>:<password> "https://<nexus-host>/repository/<repository-name>/<alpine-version>/<channel>/<architecture>/<package-file>.apk"

Where,

For example:

curl -X DELETE -u admin:admin123 "https://example.nexus.com/repository/alpine-hosted/v3.19/main/x86_64/my-package-1.0.0-r0.apk"

Learn More About APK Commands

For more Alpine Package Keeper commands, see the Alpine Package Keeper documentation.