I would like to know, given a binary's name, which package I should install on Alpine Linux.
How can I do that?
I would like to know, given a binary's name, which package I should install on Alpine Linux.
How can I do that?
You have three ways basically.
First: The package should be installed and you need to specify the full path :
apk info --who-owns /path/to/the/file
Second: Use the pkgs.alpinelinux.org website
Third: Use the api.alpinelinux.org API by filtering the json output. For this you need a json parser like jq:
apk add jq
then use the API with the instructions provided here
I've released a tiny utility that allows to search via CLI what can be found on pkgs.alpinelinux.org website: https://github.com/fcolista/apkfile
.: Francesco
You're looking for the equivalent of Debian's apt-file for Alpine. Searching for that yields apk-file.
Basically apt-file but for alpine.
File search bar, type the name of the file you are looking forExample looking for file telnet:
given a binary's name, which package I should install on Alpine Linux.
The answer to the body of the question (not the same as the answer to the title of the question) is
apk search -xqa cmd:vim (where vim is the "binary's name"). In this case, there are two packages that provide that command.