Run update.sh
This commit is contained in:
parent
85022e08c8
commit
f611727eff
|
|
@ -82,26 +82,58 @@ Where `src/` is the directory containing all your php code and `config/` contain
|
||||||
|
|
||||||
### How to install more PHP extensions
|
### How to install more PHP extensions
|
||||||
|
|
||||||
We provide two convenient scripts named `docker-php-ext-configure` and `docker-php-ext-install`, you can use them to easily install PHP extension.
|
We provide the helper scripts `docker-php-ext-configure`, `docker-php-ext-install`, and `docker-php-ext-enable` to more easily install PHP extensions.
|
||||||
|
|
||||||
|
#### PHP Core Extensions
|
||||||
|
|
||||||
For example, if you want to have a PHP-FPM image with `iconv`, `mcrypt` and `gd` extensions, you can inherit the base image that you like, and write your own `Dockerfile` like this:
|
For example, if you want to have a PHP-FPM image with `iconv`, `mcrypt` and `gd` extensions, you can inherit the base image that you like, and write your own `Dockerfile` like this:
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM php:5.6-fpm
|
FROM php:5-fpm
|
||||||
# Install modules
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
libjpeg62-turbo-dev \
|
libjpeg62-turbo-dev \
|
||||||
libmcrypt-dev \
|
libmcrypt-dev \
|
||||||
libpng12-dev \
|
libpng12-dev \
|
||||||
&& docker-php-ext-install iconv mcrypt \
|
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
|
||||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||||
&& docker-php-ext-install gd
|
&& docker-php-ext-install -j$(nproc) gd
|
||||||
CMD ["php-fpm"]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
#### PECL extensions
|
||||||
|
|
||||||
|
Some extensions are not provided with the PHP source, but are instead available through [PECL](https://pecl.php.net/). To install a PECL extension, use `pecl install` to download and compile it, then use `docker-php-ext-enable` to enable it:
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
FROM php:5-fpm
|
||||||
|
RUN apt-get update && apt-get install -y libmemcached-dev \
|
||||||
|
&& pecl install memcached \
|
||||||
|
&& docker-php-ext-enable memcached
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Other extensions
|
||||||
|
|
||||||
|
Some extensions are not provided via either Core or PECL; these can be installed too, although the process is less automated:
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
FROM php:5-apache
|
||||||
|
RUN curl -fsSL 'https://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz' -o xcache.tar.gz \
|
||||||
|
&& mkdir -p xcache \
|
||||||
|
&& tar -xf xcache.tar.gz -C xcache --strip-components=1 \
|
||||||
|
&& rm xcache.tar.gz \
|
||||||
|
&& ( \
|
||||||
|
cd xcache \
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure --enable-xcache \
|
||||||
|
&& make -j$(nproc) \
|
||||||
|
&& make install \
|
||||||
|
) \
|
||||||
|
&& rm -r xcache \
|
||||||
|
&& docker-php-ext-enable xcache
|
||||||
|
```
|
||||||
|
|
||||||
### Without a `Dockerfile`
|
### Without a `Dockerfile`
|
||||||
|
|
||||||
If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following:
|
If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
# Supported tags and respective `Dockerfile` links
|
# Supported tags and respective `Dockerfile` links
|
||||||
|
|
||||||
- [`7.7.4`, `7.7`, `7` (*7.7/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/e60211c46e9fd4b4f9ee679946bc9915ae2bf0c0/7.7/Dockerfile)
|
- [`7.7.4`, `7.7`, `7` (*7.7/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/e60211c46e9fd4b4f9ee679946bc9915ae2bf0c0/7.7/Dockerfile)
|
||||||
- [`8.0.1`, `8.0`, `8`, `latest` (*8.0/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/c134a81cacf5f83a28842d4b7b09472d97bcb6ef/8.0/Dockerfile)
|
- [`8.0.2`, `8.0`, `8`, `latest` (*8.0/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/e9cf37071e700b6e94427a87edddd438933fc87c/8.0/Dockerfile)
|
||||||
- [`8.0.1-onbuild`, `8.0-onbuild`, `8-onbuild`, `onbuild` (*8.0/onbuild/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/e60211c46e9fd4b4f9ee679946bc9915ae2bf0c0/8.0/onbuild/Dockerfile)
|
- [`8.0.2-onbuild`, `8.0-onbuild`, `8-onbuild`, `onbuild` (*8.0/onbuild/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/e60211c46e9fd4b4f9ee679946bc9915ae2bf0c0/8.0/onbuild/Dockerfile)
|
||||||
|
|
||||||
For more information about this image and its history, please see [the relevant manifest file (`library/sentry`)](https://github.com/docker-library/official-images/blob/master/library/sentry). This image is updated via pull requests to [the `docker-library/official-images` GitHub repo](https://github.com/docker-library/official-images).
|
For more information about this image and its history, please see [the relevant manifest file (`library/sentry`)](https://github.com/docker-library/official-images/blob/master/library/sentry). This image is updated via pull requests to [the `docker-library/official-images` GitHub repo](https://github.com/docker-library/official-images).
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue