README.md 3.17 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  |
|---------|-----------------------|-----------------|
Ian Rodrigues's avatar
Ian Rodrigues committed
18
19
| 7.1     | 7.1.2                 | http://php.codecasts.rocks/7.1 |
| 7.0     | 7.0.16                | 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
29
wget -O /etc/apk/keys/diego@hernandev.com-58b4c2e0.rsa.pub http://php.codecasts.rocks/php-alpine.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**

Fabio Vedovelli's avatar
Fabio Vedovelli committed
93
This section will be updated as more extension are added.
94

95
96
`php7-apcu` `php7-imagick` `php7-libsodium` `php7-memcached`
`php7-mongodb` `php7-redis` `php7-xdebug`
97

98

Diego Hernandes's avatar
README    
Diego Hernandes committed
99
100
### Usage on Docker

Fabio Vedovelli's avatar
Fabio Vedovelli committed
101
If you're looking into this, you probably want to create some Rockstar Docker images, right?
Diego Hernandes's avatar
README    
Diego Hernandes committed
102
103
104
105
106
107
108
109

Here is a very basic example for installing PHP 7.1:

```dockerfile

FROM alpine:3.5

RUN wget -O /etc/apk/keys/diego@hernandev.com-58b4c2e0.rsa.pub \
Eduardo Bizarro's avatar
Eduardo Bizarro committed
110
    http://php.codecasts.rocks/php-alpine.pub && \
Eduardo Bizarro's avatar
Eduardo Bizarro committed
111
    echo "http://php.codecasts.rocks/7.1" >> /etc/apk/repositories && \
112
    apk add --update php7 php7-mbstring php7-any-other-extensions-you-may-want
Diego Hernandes's avatar
README    
Diego Hernandes committed
113
114
115

```