PHP.earth Alpine Linux repository

  • PHP 7.0, 7.1, 7.2
  • Composer
  • PHPUnit
  • OpenLiteSpeed
  • PECL extensions: apcu, imagick, memcached, mongodb, redis, sodium, swoole, xdebug

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.

Quick usage

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/repositories

PHP.earth packages are prefixed with php7.2, php7.1, and php7.0:

apk search --no-cache php7.2*

Requirements

  • Alpine Linux 3.7

Detailed instructions

Repository installation

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-certificates

Making 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.pub

Last 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/repositories

Sources

PHP.earth Alpine Linux repository is located on GitHub.



Found a typo? Something wrong with this content?

Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all contributors.