| description | Alpine repository with PHP 7.2, PHP 7.1, PHP 7.0, and additional packages for elegant PHP development experience |
|---|
This repository includes packages with the latest PHP versions and some most commonly used PECL extensions for the elegant PHP development experience on Alpine Linux.
On Alpine Linux add a PHP.earth repository and make it trusted:
apk add --no-cache wget ca-certificates \
&& wget -O /etc/apk/keys/phpearth.rsa.pub https://repos.php.earth/alpine/phpearth.rsa.pub \
&& echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositoriesPHP.earth packages are prefixed with php7.2, php7.1, and php7.0:
apk search --no-cache php7.2*- Alpine Linux
3.7
Let's go through repository installation step by step. Before adding the repository, add wget and common CA certificates PEM files in case they haven't been added yet. This will enable downloading files from the HTTPS locations.
apk add --no-cache wget ca-certificatesMaking the repository trusted is done by downloading the public key:
wget -O /etc/apk/keys/phpearth.rsa.pub https://repos.php.earth/alpine/phpearth.rsa.pubLast step is registering the repository on APK by appending a new line in
/etc/apk/repositories:
echo "https://repos.php.earth/alpine/v3.7" >> /etc/apk/repositoriesPHP.earth Alpine Linux repository is located on GitHub.