Alpine Add Package from Edge repository

RepositoryAlpinePackage Managers

Repository Problem Overview


If I'm using Alpine 3.8, how can I add a specific package from the Alpine Edge repository? Is this even supported? There is no equivalent of backports, from what I can see.

I want to add the new version of this: https://pkgs.alpinelinux.org/package/edge/community/armhf/librdkafka

And not the older version in the 3.8 repo: https://pkgs.alpinelinux.org/package/v3.8/community/s390x/librdkafka

Repository Solutions


Solution 1 - Repository

You could specify the exact repo to apk, using the --repository parameter.
In your case:

apk add librdkafka --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community

Solution 2 - Repository

You can also add the repo:

echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories

and reference it with apk via @testing. Example:

apk add package-name@testing

Solution 3 - Repository

Edge repository may be enabled permanently. Just do the following:

sed -i '/edge/s/^#//' /etc/apk/repositories

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionclayView Question on Stackoverflow
Solution 1 - RepositoryvalianoView Answer on Stackoverflow
Solution 2 - RepositoryBorisSView Answer on Stackoverflow
Solution 3 - RepositoryKaMeHbView Answer on Stackoverflow