README.md 3.82 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
8
9
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.

Additionally, we will include extensions many packaged extensions from PECL.

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

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

Right now, the following PHP Versions are available:

16
17
| Version | Current Patch Version | Repository URL  |
|---------|-----------------------|-----------------|
Diego Hernandes's avatar
Diego Hernandes committed
18
19
| 7.1     | 7.1.4                 | http://php.codecasts.rocks/7.1 |
| 7.0     | 7.0.18                | http://php.codecasts.rocks/7.0 |
Diego Hernandes's avatar
Diego Hernandes committed
20

Fabio Vedovelli's avatar
Fabio Vedovelli committed
21
> 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
22

23
## Setting UP
Diego Hernandes's avatar
Diego Hernandes committed
24

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

27
#### 1) Trusting the repository
Diego Hernandes's avatar
Diego Hernandes committed
28
```bash
Diego Hernandes's avatar
Diego Hernandes committed
29
wget -O /etc/apk/keys/php-alpine.rsa.pub http://php.codecasts.rocks/php-alpine.rsa.pub
Diego Hernandes's avatar
Diego Hernandes committed
30
31
```

32
33
34
35
36
#### 2) Choosing and Registering the repository on APK

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

For PHP 7.0:
Diego Hernandes's avatar
Diego Hernandes committed
37
38

```bash
39
echo "http://php.codecasts.rocks/7.0" >> /etc/apk/repositories
40
41
42
43
44
```

For PHP 7.1:

```bash
45
echo "http://php.codecasts.rocks/7.1" >> /etc/apk/repositories
Diego Hernandes's avatar
Diego Hernandes committed
46
47
48
49
```

### Usage

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

Diego Hernandes's avatar
Diego Hernandes committed
52
```bash
53
apk search php7*
Diego Hernandes's avatar
Diego Hernandes committed
54
55
```

56
57
58

## Available Packages

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

Diego Hernandes's avatar
Diego Hernandes committed
61
- **Core Packages (Provide Binaries or Modules)**
Diego Hernandes's avatar
Diego Hernandes committed
62
63

`php7` `php7-common` `php7-fpm` `php7-cgi` `php7-apache2`
64

Diego Hernandes's avatar
Diego Hernandes committed
65
- **Special Packages (Not needed at runtime)**
Diego Hernandes's avatar
Diego Hernandes committed
66
67

`php7-doc` `php7-dev`
68

Diego Hernandes's avatar
Diego Hernandes committed
69
- **Core Extensions**
Diego Hernandes's avatar
Diego Hernandes committed
70
71

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

Diego Hernandes's avatar
Diego Hernandes committed
73
`php7-dom` `php7-embed` `php7-enchant` `php7-exif` `php7-ftp` `php7-gd` 
Diego Hernandes's avatar
Diego Hernandes committed
74

Diego Hernandes's avatar
Diego Hernandes committed
75
`php7-gettext` `php7-gmp` `php7-iconv` `php7-imap` `php7-intl` `php7-json`
Diego Hernandes's avatar
Diego Hernandes committed
76

Diego Hernandes's avatar
Diego Hernandes committed
77
`php7-ldap` `php7-litespeed` `php7-mbstring` `php7-mcrypt` `php7-mysqli`
Diego Hernandes's avatar
Diego Hernandes committed
78

Diego Hernandes's avatar
Diego Hernandes committed
79
`php7-mysqlnd` `php7-odbc` `php7-opcache` `php7-openssl` `php7-pcntl`
Diego Hernandes's avatar
Diego Hernandes committed
80

Diego Hernandes's avatar
Diego Hernandes committed
81
`php7-pdo` `php7-pdo_dblib` `php7-pdo_mysql` `php7-pdo_pgsql` `php7-pdo_sqlite`
Diego Hernandes's avatar
Diego Hernandes committed
82

Diego Hernandes's avatar
Diego Hernandes committed
83
`php7-pear` `php7-pgsql` `php7-phar` `php7-phpdbg` `php7-posix` `php7-pspell`
Diego Hernandes's avatar
Diego Hernandes committed
84

Diego Hernandes's avatar
Diego Hernandes committed
85
`php7-session` `php7-shmop` `php7-snmp` `php7-soap` `php7-sockets` `php7-sqlite3`
Diego Hernandes's avatar
Diego Hernandes committed
86

Diego Hernandes's avatar
Diego Hernandes committed
87
`php7-sysvmsg` `php7-sysvsem` `php7-sysvshm` `php7-tidy` `php7-wddx` `php7-xml` 
Diego Hernandes's avatar
Diego Hernandes committed
88

Diego Hernandes's avatar
Diego Hernandes committed
89
`php7-xmlreader` `php7-xmlrpc` `php7-xsl` `php7-zip` `php7-zlib`
90
  
Diego Hernandes's avatar
Diego Hernandes committed
91
92
- **Additional Extensions**

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

Diego Hernandes's avatar
Diego Hernandes committed
95
96
97
98
99
100
101
102
103
| 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              |
| MongoDB   | php7-mongodb   | 1.2.8           | Yes              | Yes              |
| Redis     | php7-redis     | 3.1.2           | Yes              | Yes              |
| xDebug    | php7-xdebug    | 2.5.3           | Yes              | Yes              |
104

Diego Hernandes's avatar
README    
Diego Hernandes committed
105
106
### Usage on Docker

Fabio Vedovelli's avatar
Fabio Vedovelli committed
107
If you're looking into this, you probably want to create some Rockstar Docker images, right?
Diego Hernandes's avatar
README    
Diego Hernandes committed
108
109
110
111
112
113
114

Here is a very basic example for installing PHP 7.1:

```dockerfile

FROM alpine:3.5

Diego Hernandes's avatar
Diego Hernandes committed
115
116
RUN wget -O /etc/apk/keys/php-alpine.rsa.pub \
    http://php.codecasts.rocks/php-alpine.rsa.pub && \
Eduardo Bizarro's avatar
Eduardo Bizarro committed
117
    echo "http://php.codecasts.rocks/7.1" >> /etc/apk/repositories && \
118
    apk add --update php7 php7-mbstring php7-any-other-extensions-you-may-want
Diego Hernandes's avatar
README    
Diego Hernandes committed
119
120
121

```