README.md 5.46 KB
Newer Older
1
# PHP Repositories for Alpine
Diego Hernandes's avatar
Diego Hernandes committed
2

3
By [CODECASTS](https://codecasts.com.br) - **Based on the work of [Valery Kartel](https://github.com/vakartel)**
Diego Hernandes's avatar
Diego Hernandes committed
4

5
---
Diego Hernandes's avatar
Diego Hernandes committed
6
7
The main goal of this repository (both code and packages) is to provide the latest versions of PHP as they are released on http://php.net.

Pascal Hofmann's avatar
Pascal Hofmann committed
8
Additionally, we will include many packaged extensions from PECL.
Diego Hernandes's avatar
Diego Hernandes committed
9

Diego Hernandes's avatar
Diego Hernandes committed
10
11
---

12
## Available PHP Versions
Diego Hernandes's avatar
Diego Hernandes committed
13

Diego Hernandes's avatar
Diego Hernandes committed
14
15
16
17
18
19
20
21
22
Alpine Versions are supported as they're being released. 

You should always use the lastest **STABLE** Alpine version, Right now, that means `Alpine Version 3.6`.

The `v3.6` repositories are intended for alpine `v3.6` version [STABLE RECOMMENTED VERSION].
The `v3.5` repositories are intended for alpine `v3.5` version [LEGACY].
The `edge` repositories are intended for alpine `edge` version [TESTING / NEXT RELEASE].


Diego Hernandes's avatar
Diego Hernandes committed
23
24
Right now, the following PHP Versions are available:

Diego Hernandes's avatar
Diego Hernandes committed
25
### Alpine 3.6 (STABLE)
Diego Hernandes's avatar
Diego Hernandes committed
26
27
28

Only PHP 7.1 will be available for Alpine 3.6. That's because PHP 7.0 is too old now.

Diego Hernandes's avatar
Diego Hernandes committed
29
30
31
32
33
| PHP Version | Current PHP Minor Version | Repository URL                            |
|-------------|---------------------------|-------------------------------------------|
| 7.1         | 7.1.7                     | http://php.codecasts.rocks/v3.6/php-7.1   |

### Alpine 3.5 (OLD STABLE) (LEGACY)
Diego Hernandes's avatar
Diego Hernandes committed
34
35
36

PHP 7.0 and 7.1 are available for Alpine 3.5. Only because that is how this repository started.

Diego Hernandes's avatar
Diego Hernandes committed
37
38
39
40
| PHP Version | Current PHP Minor Version | Repository URL                            |
|-------------|---------------------------|-------------------------------------------|
| 7.1         | 7.1.7                     | http://php.codecasts.rocks/v3.5/php-7.1   |
| 7.0         | 7.0.21                    | http://php.codecasts.rocks/v3.5/php-7.0   |
Diego Hernandes's avatar
Diego Hernandes committed
41

Diego Hernandes's avatar
Diego Hernandes committed
42
43
44
45
46
47
48
49
### Alpine Edge (3.7 - November Release)

This is the development version of alpine, that will be released on November.
PHP 7.2 will also be released a few days after Alpine 3.7 gets stable, so PHP 7.2 will be available only on Alpine 3.7

When builds are available, they will be included here.


Fabio Vedovelli's avatar
Fabio Vedovelli committed
50
> Each version is available on a separate repository, choose the one you want and follow the instructions below:
Diego Hernandes's avatar
Diego Hernandes committed
51

52
## Setting UP
Diego Hernandes's avatar
Diego Hernandes committed
53

Fabio Vedovelli's avatar
Fabio Vedovelli committed
54
You make this repository available in two simple steps:
Diego Hernandes's avatar
Diego Hernandes committed
55

56
57
*Notice:* Be sure to enable `main` and `community` Alpine repositories first.

58
#### 1) Trusting the repository
Diego Hernandes's avatar
Diego Hernandes committed
59
```bash
Diego Hernandes's avatar
Diego Hernandes committed
60
wget -O /etc/apk/keys/php-alpine.rsa.pub http://php.codecasts.rocks/php-alpine.rsa.pub
Diego Hernandes's avatar
Diego Hernandes committed
61
62
```

63
64
65
66
#### 2) Choosing and Registering the repository on APK

Before registering the repository, you should choose which version of PHP you want.

Diego Hernandes's avatar
Diego Hernandes committed
67
For PHP 7.1:
Diego Hernandes's avatar
Diego Hernandes committed
68
69

```bash
Diego Hernandes's avatar
Diego Hernandes committed
70
echo "@php http://php.codecasts.rocks/v3.6/php-7.1" >> /etc/apk/repositories
71
72
```

Diego Hernandes's avatar
Diego Hernandes committed
73
For PHP 7.0:
74
75

```bash
Diego Hernandes's avatar
Diego Hernandes committed
76
echo "@php http://php.codecasts.rocks/v3.6/php-7.0" >> /etc/apk/repositories
Diego Hernandes's avatar
Diego Hernandes committed
77
78
79
80
```

### Usage

Fabio Vedovelli's avatar
Fabio Vedovelli committed
81
For installing PHP and other available extensions you can simply search for the ones you want:
Diego Hernandes's avatar
Diego Hernandes committed
82

Diego Hernandes's avatar
Diego Hernandes committed
83
```bash
84
apk search php7*
Diego Hernandes's avatar
Diego Hernandes committed
85
86
```

Diego Hernandes's avatar
Diego Hernandes committed
87
88
89
90
91
92
93
94
95
96
### Package Conflicts

If official PHP packages conflicts and you endup installing a offical version istead of the ones on this repo, please install packages
by using `@php` at the end of package name.

```
# i.e.
apk add --update php7-redis@php
```

97
98
99

## Available Packages

Fabio Vedovelli's avatar
Fabio Vedovelli committed
100
The following packages are available for installation on both 7.0 and 7.1 repositories:
101

Diego Hernandes's avatar
Diego Hernandes committed
102
- **Core Packages (Provide Binaries or Modules)**
Diego Hernandes's avatar
Diego Hernandes committed
103
104

`php7` `php7-common` `php7-fpm` `php7-cgi` `php7-apache2`
105

Diego Hernandes's avatar
Diego Hernandes committed
106
- **Special Packages (Not needed at runtime)**
Diego Hernandes's avatar
Diego Hernandes committed
107
108

`php7-doc` `php7-dev`
109

Diego Hernandes's avatar
Diego Hernandes committed
110
- **Core Extensions**
Diego Hernandes's avatar
Diego Hernandes committed
111
112

`php7-bcmath` `php7-bz2` `php7-calendar` `php7-ctype` `php7-curl` `php7-dba` 
Diego Hernandes's avatar
Diego Hernandes committed
113

Diego Hernandes's avatar
Diego Hernandes committed
114
`php7-dom` `php7-embed` `php7-enchant` `php7-exif` `php7-ftp` `php7-gd` 
Diego Hernandes's avatar
Diego Hernandes committed
115

Diego Hernandes's avatar
Diego Hernandes committed
116
`php7-gettext` `php7-gmp` `php7-iconv` `php7-imap` `php7-intl` `php7-json`
Diego Hernandes's avatar
Diego Hernandes committed
117

Diego Hernandes's avatar
Diego Hernandes committed
118
`php7-ldap` `php7-litespeed` `php7-mbstring` `php7-mcrypt` `php7-mysqli`
Diego Hernandes's avatar
Diego Hernandes committed
119

Diego Hernandes's avatar
Diego Hernandes committed
120
`php7-mysqlnd` `php7-odbc` `php7-opcache` `php7-openssl` `php7-pcntl`
Diego Hernandes's avatar
Diego Hernandes committed
121

Diego Hernandes's avatar
Diego Hernandes committed
122
`php7-pdo` `php7-pdo_dblib` `php7-pdo_mysql` `php7-pdo_pgsql` `php7-pdo_sqlite`
Diego Hernandes's avatar
Diego Hernandes committed
123

Diego Hernandes's avatar
Diego Hernandes committed
124
`php7-pear` `php7-pgsql` `php7-phar` `php7-phpdbg` `php7-posix` `php7-pspell`
Diego Hernandes's avatar
Diego Hernandes committed
125

Diego Hernandes's avatar
Diego Hernandes committed
126
`php7-session` `php7-shmop` `php7-snmp` `php7-soap` `php7-sockets` `php7-sqlite3`
Diego Hernandes's avatar
Diego Hernandes committed
127

Diego Hernandes's avatar
Diego Hernandes committed
128
`php7-sysvmsg` `php7-sysvsem` `php7-sysvshm` `php7-tidy` `php7-wddx` `php7-xml` 
Diego Hernandes's avatar
Diego Hernandes committed
129

Diego Hernandes's avatar
Diego Hernandes committed
130
`php7-xmlreader` `php7-xmlrpc` `php7-xsl` `php7-zip` `php7-zlib`
131
  
Diego Hernandes's avatar
Diego Hernandes committed
132
133
- **Additional Extensions**

Diego Hernandes's avatar
Diego Hernandes committed
134
Some additional PECL extensions are provided so you don't need to build them.
135

Diego Hernandes's avatar
Diego Hernandes committed
136
137
138
139
140
141
| Extension | Package Name   | Current Version | Available on 7.0 | Available on 7.1 |
|-----------|----------------|-----------------|------------------|------------------|
| APCu      | php7-apcu      | 5.1.8           | Yes              | Yes              |
| Imagick   | php7-imagick   | 3.4.3           | Yes              | Yes              |
| libsodium | php7-libsodium | 1.0.6           | Yes              | Yes              |
| memcached | php7-memcached | 3.0.3           | Yes              | Yes              |
Diego Hernandes's avatar
Diego Hernandes committed
142
| MongoDB   | php7-mongodb   | 1.2.9           | Yes              | Yes              |
Diego Hernandes's avatar
Diego Hernandes committed
143
| Redis     | php7-redis     | 3.1.2           | Yes              | Yes              |
Diego Hernandes's avatar
Diego Hernandes committed
144
| xDebug    | php7-xdebug    | 2.5.5           | Yes              | Yes              |
145

Diego Hernandes's avatar
README    
Diego Hernandes committed
146
147
### Usage on Docker

Fabio Vedovelli's avatar
Fabio Vedovelli committed
148
If you're looking into this, you probably want to create some Rockstar Docker images, right?
Diego Hernandes's avatar
README    
Diego Hernandes committed
149
150
151
152
153
154
155

Here is a very basic example for installing PHP 7.1:

```dockerfile

FROM alpine:3.5

Nikolay Kolev's avatar
Nikolay Kolev committed
156
ADD https://php.codecasts.rocks/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
Diego Hernandes's avatar
Diego Hernandes committed
157
RUN echo "http://php.codecasts.rocks/v3.6/php-7.1" >> /etc/apk/repositories && \
158
    apk add --update php7 php7-mbstring php7-any-other-extensions-you-may-want
Diego Hernandes's avatar
README    
Diego Hernandes committed
159
160
161

```