diff --git a/Dockerfile b/Dockerfile index 5e911e3..7c85822 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,9 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list \ ; fi \ && apt-get update \ - && apt-get install -y \ - autoconf pkg-config \ - php$PHP_VERSION-cli php-dev libevent-dev zlib1g-dev \ + && apt-get install --no-install-recommends -y \ + build-essential autoconf pkg-config patch \ + php$PHP_VERSION-cli php$PHP_VERSION-dev libevent-dev zlib1g-dev \ && if [ $ENABLE_IGBINARY -eq 1 ]; then apt-get install -y php-igbinary; fi \ && if [ $ENABLE_MSGPACK -eq 1 ]; then apt-get install -y php-msgpack; fi \ && apt-get clean @@ -64,6 +64,7 @@ RUN rm -rf /build RUN if ldd `find /usr/lib/php/ -name memcached.so` | grep memcached; then exit 1; fi # check that the PHP extension can be loaded: -RUN php -dextension=memcached.so -m | grep 'memcached' \ +RUN php -v \ + && php -dextension=memcached.so -m | grep 'memcached' \ && php -dextension=memcached.so -r 'new Memcached();' \ && php -dextension=memcached.so -r 'if (!defined("Memcached::DYNAMIC_CLIENT_MODE")) exit(1);' diff --git a/README.md b/README.md index 61a95a1..7de8ef4 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ### Supported flavors - only Linux 64bit -- PHP 7.1 through to PHP 7.4 - thanks to the sury.org PHP repository! +- PHP 7.1 through to PHP 7.4 and also PHP 8 - thanks to the sury.org PHP repository! - with or without igbinary (`--build-arg ENABLE_IGBINARY=1`) - with or without msgpack (`--build-arg ENABLE_MSGPACK=1`) - with or without JSON (`--build-arg ENABLE_JSON=1`) @@ -20,11 +20,11 @@ 1. Clone this repo 2. `git submodule update --init` 3. In the `aws-elasticache-cluster-client-*` repos, switch to the git branch that you want to build. Usually the default is fine. -4. Build the library and the extension, either with or without support for igbinary serialization: +4. Build the library and the extension, enable optional features using the `build-arg`s listed above: ``` docker build --iidfile=/tmp/elasticache.docker \ --build-arg PHP_VERSION=7.4 \ - --build-arg ENABLE_IGBINARY=0 \ + --build-arg ENABLE_JSON=1 \ . ``` 5. Extract the freshly built PHP extension, optionally wrap into a tar file: