Bläddra i källkod

Run update.sh

Docker Library Bot 9 år sedan
förälder
incheckning
ecfffde132
1 ändrade filer med 17 tillägg och 4 borttagningar
  1. 17 4
      php/README.md

+ 17 - 4
php/README.md

@@ -128,9 +128,9 @@ Remember, you must install dependencies for your extensions manually. If an exte
 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:7.0-fpm
-RUN apt-get update && apt-get install -y libmemcached-dev \
-	&& pecl install memcached \
+FROM php:5.6-fpm
+RUN apt-get update && apt-get install -y libmemcached-dev zlib1g-dev \
+	&& pecl install memcached-2.2.0 \
 	&& docker-php-ext-enable memcached
 ```
 
@@ -139,7 +139,7 @@ RUN apt-get update && apt-get install -y libmemcached-dev \
 Some extensions are not provided via either Core or PECL; these can be installed too, although the process is less automated:
 
 ```dockerfile
-FROM php:7.0-apache
+FROM php:5.6-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 \
@@ -155,6 +155,19 @@ RUN curl -fsSL 'https://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.
 	&& docker-php-ext-enable xcache
 ```
 
+The `docker-php-ext-*` scripts *can* accept an arbitrary path, but it must be absolute (to disambiguate from built-in extension names), so the above example could also be written as the following:
+
+```dockerfile
+FROM php:5.6-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 /tmp/xcache \
+	&& tar -xf xcache.tar.gz -C /tmp/xcache --strip-components=1 \
+	&& rm xcache.tar.gz \
+	&& docker-php-ext-configure /tmp/xcache --enable-xcache \
+	&& docker-php-ext-install /tmp/xcache \
+	&& rm -r /tmp/xcache
+```
+
 ### Without a `Dockerfile`
 
 If you don't want to include a `Dockerfile` in your project, it is sufficient to do the following: