From f611727effb7eb8d83e569a4c4734cad6944394f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 19 Jan 2016 16:15:17 -0800 Subject: [PATCH] Run update.sh --- php/README.md | 44 ++++++++++++++++++++++++++++++++++++++------ sentry/README.md | 4 ++-- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/php/README.md b/php/README.md index 7b4fc4c578d8..8762c109beed 100644 --- a/php/README.md +++ b/php/README.md @@ -82,26 +82,58 @@ Where `src/` is the directory containing all your php code and `config/` contain ### 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: ```dockerfile -FROM php:5.6-fpm -# Install modules +FROM php:5-fpm RUN apt-get update && apt-get install -y \ libfreetype6-dev \ libjpeg62-turbo-dev \ libmcrypt-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-install gd -CMD ["php-fpm"] + && docker-php-ext-install -j$(nproc) gd ``` 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` If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following: diff --git a/sentry/README.md b/sentry/README.md index 895db0e36c4c..2ecaf18e23e3 100644 --- a/sentry/README.md +++ b/sentry/README.md @@ -1,8 +1,8 @@ # 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) -- [`8.0.1`, `8.0`, `8`, `latest` (*8.0/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/c134a81cacf5f83a28842d4b7b09472d97bcb6ef/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`, `8.0`, `8`, `latest` (*8.0/Dockerfile*)](https://github.com/getsentry/docker-sentry/blob/e9cf37071e700b6e94427a87edddd438933fc87c/8.0/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).