Skip to content

Commit 4c2af77

Browse files
Grummfytianon
authored andcommitted
Adding an example about pecl extension
1 parent ba2d0c5 commit 4c2af77

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

php/content.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ CMD ["php-fpm"]
8686

8787
Remember, you must install dependencies for your extensions manually. If an extension needs custom `configure` arguments, you can use the `docker-php-ext-configure` script like this example.
8888

89+
### How to install PECL extensions
90+
Some "extension" are in reality [PECL](https://pecl.php.net/) extension. To install a pecl extension you need to do this (for memcached) :
91+
92+
```dockerfile
93+
FROM php:5.6-fpm
94+
# Install pecl extension
95+
RUN apt-get update && apt-get install -y libmemcached-dev && pecl install memcached
96+
CMD ["php-fpm"]
97+
```
98+
8999
### Without a `Dockerfile`
90100

91101
If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following:

0 commit comments

Comments
 (0)