= APK = '''`apk(8)`''' ('''Alpine Package Keeper''') is the package manager for Alpine Linux. It is specially designed to manage packages on a system that itself is designed to run in memory. <> ---- == Usage == To update local metadata and upgrade installed packages, try: {{{ apk update apk upgrade }}} To install a package, try: {{{ apk add docker }}} ---- == Configuration == === Repositories === A respository is enabled or disabled simply by adding/deleting/(un)commenting a line in `etc/apk/repositories`. For example, a `community` repository is typically listed but commented out by default. To enable it, uncomment the line. For custom repositories, '''prepend''' the corresponding URI to the file. It is important to ''prepend'' rather than ''append'', as `apk(1)` scans repositories in order and some packages may be shadowed for the additional software. {{{ cat - /etc/apk/repositories <<<"$repouri" >/etc/apk/repositories }}} === Signing Keys === Packages are signed by default, and `apk(1)` checks signatures against the keys installed in `/etc/apk/keys/`. Custom repositories typically have the public key available in the root directory. {{{ wget --quiet --output-document=/etc/apk/keys/$keyfile $keyuri/$keyfile }}} ---- == See also == [[https://man.archlinux.org/man/community/apk-tools/apk.8.en|apk(8)]] ---- CategoryRicottone