README.md 8.93 KB
Newer Older
Diego Hernandes's avatar
Diego Hernandes committed
1
## PHP-ALPINE: Fresh PHP binaries APK repository for Alpine Linux.
Diego Hernandes's avatar
Diego Hernandes committed
2

3
**Currently Supporting PHP 8.0**, also, PHP 7.4 and PHP 7.3.
Diego Hernandes's avatar
Diego Hernandes committed
4

Diego Hernandes's avatar
Diego Hernandes committed
5
This project provides a simple alternative for running updated PHP binaries on Alpine Linux.
Diego Hernandes's avatar
Diego Hernandes committed
6
7
We pack and release PHP versions as soon they are available on http://php.net. (At least, we try to.)
Additionally, many PECL extensions are also available as packages as well.
Diego Hernandes's avatar
Diego Hernandes committed
8

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#### Created by:
  - Diego Hernandes - **[@hernandev](https://github.com/hernandev)**
  
#### Support, Help and Faith:
  - Ueli Banholzer - **[@xarem](https://github.com/xarem)** 
  - whatwedo GmbH - **[@whatwedo](https://github.com/whatwedo)**
  - individual [contributors](https://github.com/codecasts/php-alpine/graphs/contributors)


#### Main Related Projects:
- **[Ambientum](https://github.com/ambientum/ambientum)** by [@hernandev](https://github.com/hernandev) 
  Docker native solution for running Laravel projects. From Development to Production. 

- **[DDE](https://github.com/whatwedo/dde)** by [@whatwedo](https://github.com/whatwedo) 
  Local development environment toolset based on Docker


Diego Hernandes's avatar
Diego Hernandes committed
27
---
Diego Hernandes's avatar
Diego Hernandes committed
28
29


Diego Hernandes's avatar
Diego Hernandes committed
30
## APK Repositories & Release Cycle
Diego Hernandes's avatar
Diego Hernandes committed
31

Diego Hernandes's avatar
Diego Hernandes committed
32
33
34
<!-- ### PHP End of Support -->
<!-- - **PHP 7.4**     | 2021-11-28   1638057600-->
<!-- PHP 7.3     | 2020-12-06 | 1607212800-->
Ueli Banholzer's avatar
Ueli Banholzer committed
35
<!-- Alpine 3.12 | 2022-05-01 | 1651449599-->
Diego Hernandes's avatar
Diego Hernandes committed
36
37
38
<!-- Alpine 3.11 | 2021-11-01 | 1635724800-->
<!-- Alpine 3.10 | 2021-05-01 | 1619827200-->
<!-- Alpine 3.9  | 2020-11-01 | 1604188800-->
Diego Hernandes's avatar
Diego Hernandes committed
39

Diego Hernandes's avatar
Diego Hernandes committed
40
### PHP 8.0
Diego Hernandes's avatar
Diego Hernandes committed
41

Diego Hernandes's avatar
Diego Hernandes committed
42
43
| Alpine | PHP | End of Support | Repository URL
| - | - | - | -
Diego Hernandes's avatar
Diego Hernandes committed
44
45
| ![Alpine 3.12](https://img.shields.io/badge/Alpine-v3.12-blue?style=flat-square) | ![PHP 8.0](https://img.shields.io/badge/PHP-8.0-blueviolet?style=flat-square) | ![EOS](https://img.shields.io/badge/EOS-2022--05--01-success?style=flat-square) | [`php.hernandev.com/v3.12/php-8.0`](https://php.hernandev.com/v3.12/php-8.0)
| ![Alpine 3.11](https://img.shields.io/badge/Alpine-v3.11-blue?style=flat-square) | ![PHP 8.0](https://img.shields.io/badge/PHP-8.0-blueviolet?style=flat-square) | ![EOS](https://img.shields.io/badge/EOS-2021--11--01-success?style=flat-square) | [`php.hernandev.com/v3.11/php-8.0`](https://php.hernandev.com/v3.11/php-8.0)
Diego Hernandes's avatar
Diego Hernandes committed
46
47

### PHP 7.4
Diego Hernandes's avatar
Diego Hernandes committed
48

Diego Hernandes's avatar
Diego Hernandes committed
49
50
| Alpine | PHP | End of Support | Repository URL
| - | - | - | -
Diego Hernandes's avatar
Diego Hernandes committed
51
52
| ![Alpine 3.12](https://img.shields.io/badge/Alpine-v3.12-blue?style=flat-square) | ![PHP 7.4](https://img.shields.io/badge/PHP-7.4-blueviolet?style=flat-square)  | ![EOS](https://img.shields.io/badge/EOS-2021--11--01-success?style=flat-square) | [`php.hernandev.com/v3.11/php-7.4`](https://php.hernandev.com/v3.11/php-7.4)
| ![Alpine 3.10](https://img.shields.io/badge/Alpine-v3.10-blue?style=flat-square) | ![PHP 7.4](https://img.shields.io/badge/PHP-7.4-blueviolet?style=flat-square)  | ![EOS](https://img.shields.io/badge/EOS-2021--11--01-success?style=flat-square) | [`php.hernandev.com/v3.10/php-7.4`](https://php.hernandev.com/v3.10/php-7.4)
Diego Hernandes's avatar
Diego Hernandes committed
53

Diego Hernandes's avatar
Diego Hernandes committed
54
### PHP 7.3
Diego Hernandes's avatar
Diego Hernandes committed
55

Diego Hernandes's avatar
Diego Hernandes committed
56
57
| Alpine | PHP | End of Support | Repository URL
| - | - | - | -
Diego Hernandes's avatar
Diego Hernandes committed
58
59
| ![Alpine 3.11](https://img.shields.io/badge/Alpine-v3.11-blue?style=flat-square) | ![PHP 7.3](https://img.shields.io/badge/PHP-7.3-blueviolet?style=flat-square) | ![EOS](https://img.shields.io/badge/EOS-2021--05--01-success?style=flat-square) | [`php.hernandev.com/v3.11/php-7.3`](https://php.hernandev.com/v3.11/php-7.3)
| ![Alpine 3.10](https://img.shields.io/badge/Alpine-v3.10-blue?style=flat-square) | ![PHP 7.3](https://img.shields.io/badge/PHP-7.3-blueviolet?style=flat-square) | ![EOS](https://img.shields.io/badge/EOS-2020--12--06-red?style=flat-square) | [`php.hernandev.com/v3.10/php-7.3`](https://php.hernandev.com/v3.10/php-7.3)
Diego Hernandes's avatar
Diego Hernandes committed
60

Diego Hernandes's avatar
Diego Hernandes committed
61

Diego Hernandes's avatar
Diego Hernandes committed
62
63
64
Builds are available as soon as possible, and EOS is determined by:
- If either PHP or Alpine release reaches end of support, the repository will stop receiving updates.
- Support for both PHP and Alpine are estimated for around 2 years from release date.
Diego Hernandes's avatar
Diego Hernandes committed
65

Diego Hernandes's avatar
Diego Hernandes committed
66
Active support reference:
Diego Hernandes's avatar
Diego Hernandes committed
67

Diego Hernandes's avatar
Diego Hernandes committed
68
69
- PHP: https://www.php.net/supported-versions.php
- Alpine: https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases  
Diego Hernandes's avatar
Diego Hernandes committed
70

Diego Hernandes's avatar
Diego Hernandes committed
71
> Replace examples below with desired Alpine and PHP versions.
Diego Hernandes's avatar
Diego Hernandes committed
72
73


Diego Hernandes's avatar
Diego Hernandes committed
74
75
76
77
## Snippets

The following code snippets are intended for quick usage on either shell scripts or Dockerfile

Diego Hernandes's avatar
Diego Hernandes committed
78
79
> Notice that `main` and `community` official repositories must be enabled.

Diego Hernandes's avatar
Diego Hernandes committed
80
81
### Dockerfile

Diego Hernandes's avatar
Diego Hernandes committed
82
You may skip the ca-certificates part if you replace HTTPS by HTTP but you should not. PHP packages will eventually install ca-certificates anyway.
Diego Hernandes's avatar
Diego Hernandes committed
83
84

```dockerfile
Diego Hernandes's avatar
Diego Hernandes committed
85
FROM alpine:3.11
Diego Hernandes's avatar
Diego Hernandes committed
86

Diego Hernandes's avatar
Diego Hernandes committed
87
ADD https://php.hernandev.com/key/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
Diego Hernandes's avatar
Diego Hernandes committed
88

mtgto's avatar
mtgto committed
89
RUN apk --update-cache add ca-certificates && \
Diego Hernandes's avatar
Diego Hernandes committed
90
    echo "https://php.hernandev.com/v3.11/php-7.4" >> /etc/apk/repositories
Diego Hernandes's avatar
Diego Hernandes committed
91
92

# install php and some extensions
mtgto's avatar
mtgto committed
93
RUN apk add --update-cache \
Diego Hernandes's avatar
Diego Hernandes committed
94
95
96
97
98
    php \
    php-bz2 \
    php-json \
    php-mysql \
    php-any-other-available-package... 
Diego Hernandes's avatar
Diego Hernandes committed
99
100
```

101
102
103

## Available Packages

Diego Hernandes's avatar
Diego Hernandes committed
104
105
This is the complete available packages list:

Diego Hernandes's avatar
Diego Hernandes committed
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
| Package Name          | Type            |
| -                     | -               |
| `php`                 | PHP Core        |
| `php-common`          | PHP Core        |
| `php-fpm`             | PHP Core        |
| `php-cgi`             | PHP Core        |
| `php-apache2`         | PHP Core        |
| `php-doc`             | PHP Core        |
| `php-dev`             | PHP Core        |
|  -                    |                 |
| `php-sodium`          | Core Extension  |
| `php-bcmath`          | Core Extension  |
| `php-bz2`             | Core Extension  |
| `php-calendar`        | Core Extension  |
| `php-ctype`           | Core Extension  |
| `php-curl`            | Core Extension  |
| `php-dba`             | Core Extension  |
| `php-dom`             | Core Extension  |
| `php-embed`           | Core Extension  |
| `php-enchant`         | Core Extension  |
| `php-exif`            | Core Extension  |
| `php-ftp`             | Core Extension  |
| `php-gd`              | Core Extension  |
| `php-gettext`         | Core Extension  |
| `php-gmp`             | Core Extension  |
| `php-iconv`           | Core Extension  |
| `php-imap`            | Core Extension  |
| `php-intl`            | Core Extension  |
| `php-json`            | Core Extension  |
| `php-ldap`            | Core Extension  |
| `php-litespeed`       | Core Extension  |
| `php-mbstring`        | Core Extension  |
| `php-mcrypt`          | Core Extension  |
| `php-mysqli`          | Core Extension  |
| `php-mysqlnd`         | Core Extension  |
| `php-odbc`            | Core Extension  |
| `php-opcache`         | Core Extension  |
| `php-openssl`         | Core Extension  |
| `php-pcntl`           | Core Extension  |
| `php-pdo`             | Core Extension  |
| `php-pdo_dblib`       | Core Extension  |
| `php-pdo_mysql`       | Core Extension  |
| `php-pdo_pgsql`       | Core Extension  |
| `php-pdo_sqlite`      | Core Extension  |
| `php-pear`            | Core Extension  |
| `php-pgsql`           | Core Extension  |
| `php-phar`            | Core Extension  |
| `php-phpdbg`          | Core Extension  |
| `php-posix`           | Core Extension  |
| `php-pspell`          | Core Extension  |
| `php-session`         | Core Extension  |
| `php-shmop`           | Core Extension  |
| `php-snmp`            | Core Extension  |
| `php-soap`            | Core Extension  |
| `php-sockets`         | Core Extension  |
| `php-sqlite3`         | Core Extension  |
| `php-sysvmsg`         | Core Extension  |
| `php-sysvsem`         | Core Extension  |
| `php-tidy`            | Core Extension  |
| `php-wddx`            | Core Extension  |
| `php-xml`             | Core Extension  |
| `php-xmlreader`       | Core Extension  |
| `php-xmlrpc`          | Core Extension  |
| `php-xsl`             | Core Extension  |
| `php-zip`             | Core Extension  |
| `php-zlib`            | Core Extension  |
|  -                    |                 |
| `php-amqp`            | Extra Extension |
| `php-apcu`            | Extra Extension |
| `php-ast`             | Extra Extension |
| `php-ds`              | Extra Extension |
| `php-imagick`         | Extra Extension |
| `php-mailparse`       | Extra Extension |
| `php-memcached`       | Extra Extension |
| `php-mongodb`         | Extra Extension |
| `php-msgpack`         | Extra Extension |
Nyholm's avatar
Nyholm committed
182
| `php-pcov`            | Extra Extension |
Diego Hernandes's avatar
Diego Hernandes committed
183
| `php-phalcon`         | Extra Extension |
Nyholm's avatar
Nyholm committed
184
| `php-psr`             | Extra Extension |
Diego Hernandes's avatar
Diego Hernandes committed
185
186
187
188
189
190
191
192
193
194
195
| `php-redis`           | Extra Extension |
| `php-ssh2`            | Extra Extension |
| `php-swoole`          | Extra Extension |
| `php-timecop`         | Extra Extension |
| `php-libsodium`       | Extra Extension |
| `php-scalar_objects`  | Extra Extension |
| `php-secp256k1`       | Extra Extension |
| `php-xdebug`          | Extra Extension |
|  -                    |                 |
| `argon2`              | Extra Package   |
| `argon2-dev`          | Extra Package   |
Ueli Banholzer's avatar
Ueli Banholzer committed
196
197
198
| `enchant`             | Extra Package   |
| `enchant-doc`         | Extra Package   |
| `enchant-dev`         | Extra Package   |
Diego Hernandes's avatar
Diego Hernandes committed
199
| `libargon2`           | Extra Package   |
200
| `libsecp256k1`        | Extra Package   |
Diego Hernandes's avatar
Diego Hernandes committed
201

Diego Hernandes's avatar
Diego Hernandes committed
202

Diego Hernandes's avatar
Diego Hernandes committed
203
> Life's good!