@@ -3,7 +3,8 @@ FROM php:5.6-apache
33RUN a2enmod rewrite
44
55# Install the PHP extensions we need, and other packages
6- RUN apt-get update \
6+ RUN set -ex \
7+ && apt-get update \
78 && apt-get install -y --no-install-recommends \
89 curl \
910 jq \
@@ -14,14 +15,15 @@ RUN apt-get update \
1415 nfs-common \
1516 unzip \
1617 && rm -rf /var/lib/apt/lists/* \
17- && pecl install memcached \
18+ # Memcached 2.2.0 is the latest for PHP < 7
19+ # see https://pecl.php.net/package/memcached
20+ && pecl install memcached-2.2.0 \
1821 && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
1922 && docker-php-ext-install gd mysqli opcache \
20- && docker-php-ext-enable memcached
21-
22- # Set recommended PHP.ini settings
23- # See https://secure.php.net/manual/en/opcache.installation.php
24- RUN { \
23+ && docker-php-ext-enable memcached \
24+ # Set recommended PHP.ini settings
25+ # See https://secure.php.net/manual/en/opcache.installation.php
26+ && { \
2527 echo 'opcache.memory_consumption=128' ; \
2628 echo 'opcache.interned_strings_buffer=8' ; \
2729 echo 'opcache.max_accelerated_files=4000' ; \
@@ -36,10 +38,11 @@ COPY etc /etc
3638
3739# Add Containerpilot and its configuration
3840# Releases at https://github.com/joyent/containerpilot/releases
39- ENV CONTAINERPILOT_VER 2.3.0
41+ ENV CONTAINERPILOT_VER 2.7.2
4042ENV CONTAINERPILOT file:///etc/containerpilot.json
4143
42- RUN export CONTAINERPILOT_CHECKSUM=ec9dbedaca9f4a7a50762f50768cbc42879c7208 \
44+ RUN set -ex \
45+ && export CONTAINERPILOT_CHECKSUM=e886899467ced6d7c76027d58c7f7554c2fb2bcc \
4346 && curl --retry 7 --fail -Lso /tmp/containerpilot.tar.gz \
4447 "https://github.com/joyent/containerpilot/releases/download/${CONTAINERPILOT_VER}/containerpilot-${CONTAINERPILOT_VER}.tar.gz" \
4548 && echo "${CONTAINERPILOT_CHECKSUM} /tmp/containerpilot.tar.gz" | sha1sum -c \
@@ -48,8 +51,9 @@ RUN export CONTAINERPILOT_CHECKSUM=ec9dbedaca9f4a7a50762f50768cbc42879c7208 \
4851
4952# Install Consul
5053# Releases at https://releases.hashicorp.com/consul
51- RUN export CONSUL_VERSION=0.6.4 \
52- && export CONSUL_CHECKSUM=abdf0e1856292468e2c9971420d73b805e93888e006c76324ae39416edcf0627 \
54+ RUN set -ex \
55+ && export CONSUL_VERSION=0.7.5 \
56+ && export CONSUL_CHECKSUM=40ce7175535551882ecdff21fdd276cef6eaab96be8a8260e0599fadb6f1f5b8 \
5357 && curl --retry 7 --fail -vo /tmp/consul.zip "https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip" \
5458 && echo "${CONSUL_CHECKSUM} /tmp/consul.zip" | sha256sum -c \
5559 && unzip /tmp/consul -d /usr/local/bin \
@@ -58,16 +62,18 @@ RUN export CONSUL_VERSION=0.6.4 \
5862
5963# Install Consul template
6064# Releases at https://releases.hashicorp.com/consul-template/
61- RUN export CONSUL_TEMPLATE_VERSION=0.14.0 \
62- && export CONSUL_TEMPLATE_CHECKSUM=7c70ea5f230a70c809333e75fdcff2f6f1e838f29cfb872e1420a63cdf7f3a78 \
65+ RUN set -ex \
66+ && export CONSUL_TEMPLATE_VERSION=0.18.2 \
67+ && export CONSUL_TEMPLATE_CHECKSUM=6fee6ab68108298b5c10e01357ea2a8e4821302df1ff9dd70dd9896b5c37217c \
6368 && curl --retry 7 --fail -Lso /tmp/consul-template.zip "https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip" \
6469 && echo "${CONSUL_TEMPLATE_CHECKSUM} /tmp/consul-template.zip" | sha256sum -c \
6570 && unzip /tmp/consul-template.zip -d /usr/local/bin \
6671 && rm /tmp/consul-template.zip
6772
6873# Install wp-cli, http://wp-cli.org
6974ENV WP_CLI_CONFIG_PATH /var/www/html/wp-cli.yml
70- RUN curl --retry 7 --fail -Ls -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
75+ RUN set -ex \
76+ && curl --retry 7 --fail -Ls -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
7177 && chmod +x wp-cli.phar \
7278 && mv wp-cli.phar /usr/local/bin/wp \
7379 && wp --info --allow-root
@@ -78,13 +84,15 @@ COPY /var/www/html /var/www/html
7884RUN chown -R www-data:www-data /var/www/html/*
7985
8086# Install WordPress via wp-cli & move the default themes to our content dir
81- ENV WORDPRESS_VERSION 4.5.3
82- RUN wp --allow-root core download --version=${WORDPRESS_VERSION} \
87+ ENV WORDPRESS_VERSION 4.7.3
88+ RUN set -ex \
89+ && wp --allow-root core download --version=${WORDPRESS_VERSION} \
8390 && mv /var/www/html/wordpress/wp-content/themes/* /var/www/html/content/themes/
8491
8592# Install HyperDB, https://wordpress.org/plugins/hyperdb
8693# Releases at https://wordpress.org/plugins/hyperdb/developers/ , though no SHA1 fingerprints are published
87- RUN export HYPERDB_VERSION=1.1 \
94+ RUN set -ex \
95+ && export HYPERDB_VERSION=1.1 \
8896 && curl --retry 7 --fail -Ls -o /var/www/html/hyperdb.zip https://downloads.wordpress.org/plugin/hyperdb.${HYPERDB_VERSION}.zip \
8997 && unzip hyperdb.zip \
9098 && chown -R www-data:www-data /var/www/html/hyperdb \
@@ -93,7 +101,8 @@ RUN export HYPERDB_VERSION=1.1 \
93101 && touch /var/www/html/content/db-config.php
94102
95103# Install ztollman's object-cache.php or object caching to memcached
96- RUN curl --retry 7 --fail -Ls -o /var/www/html/content/object-cache.php https://raw.githubusercontent.com/tollmanz/wordpress-pecl-memcached-object-cache/master/object-cache.php
104+ RUN set -ex \
105+ && curl --retry 7 --fail -Ls -o /var/www/html/content/object-cache.php https://raw.githubusercontent.com/tollmanz/wordpress-pecl-memcached-object-cache/master/object-cache.php
97106
98107# The volume is defined after we install everything
99108VOLUME /var/www/html
0 commit comments