From c60948d08bbc0aec96221be5c34e7f087640ed21 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 20 Aug 2014 13:46:30 -0600 Subject: [PATCH 01/60] Dockerfiles to pull php and apache from source tars --- Dockerfile | 27 ++++++++++++++++ docker-apache/Dockerfile | 68 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-apache/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000..e20d7ed0315a9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D + +ENV PHP_VERSION 5.5.15 + +RUN set -x \ + && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + && apt-get purge -y curl \ + && apt-get autoremove -y \ + && rm -r /usr/src/php diff --git a/docker-apache/Dockerfile b/docker-apache/Dockerfile new file mode 100644 index 0000000000000..cfe2d05cdf5a7 --- /dev/null +++ b/docker-apache/Dockerfile @@ -0,0 +1,68 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D + +ENV PHP_VERSION 5.5.15 + +RUN set -x \ + && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + \ + && cd / \ + && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ + && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ + && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ + && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ + && gpg --verify httpd.tar.bz2.asc \ + && mkdir -p /usr/src/httpd \ + && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ + && rm httpd.tar.bz2.* \ + && cd /usr/src/httpd \ + && ./configure --enable-so \ + && make -j"$(nproc)" \ + && make install \ + && cd / \ + && rm -r /usr/src/httpd \ + && mkdir -p /var/www/html \ + && sed -r ' \ + s/(DirectoryIndex index[.])html/\1php/; \ + s!/usr/local/apache2/htdocs!/var/www/html!g; \ + s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ + s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ + $ a\n\tSetHandler application/x-httpd-php\n \ + ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ + && rm /usr/local/apache2/conf/httpd.conf \ + && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ + && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ + && cd /usr/src/php \ + && make clean \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && make -j"$(nproc)" \ + && make install \ + && cp php.ini-development /usr/local/lib/php.ini \ + && apt-get purge -y curl \ + && apt-get autoremove -y \ + && rm -r /usr/src/php + +ENV PATH $PATH:/usr/local/apache2/bin + +WORKDIR /var/www/html +VOLUME /var/www/html + +EXPOSE 80 +CMD ["apachectl", "start", "-DFOREGROUND"] From f9483c93a906759865c56c06a0c5732405650e74 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 20 Aug 2014 17:08:35 -0600 Subject: [PATCH 02/60] Add update.sh, add partial files for generating the apache Dockerfile --- Dockerfile => 5.5/Dockerfile | 0 {docker-apache => 5.5/apache}/Dockerfile | 0 Dockerfile-apache-insert | 34 +++++++++++++++++++ Dockerfile-apache-tail | 8 +++++ update.sh | 43 ++++++++++++++++++++++++ 5 files changed, 85 insertions(+) rename Dockerfile => 5.5/Dockerfile (100%) rename {docker-apache => 5.5/apache}/Dockerfile (100%) create mode 100644 Dockerfile-apache-insert create mode 100644 Dockerfile-apache-tail create mode 100755 update.sh diff --git a/Dockerfile b/5.5/Dockerfile similarity index 100% rename from Dockerfile rename to 5.5/Dockerfile diff --git a/docker-apache/Dockerfile b/5.5/apache/Dockerfile similarity index 100% rename from docker-apache/Dockerfile rename to 5.5/apache/Dockerfile diff --git a/Dockerfile-apache-insert b/Dockerfile-apache-insert new file mode 100644 index 0000000000000..87f0e17a6147c --- /dev/null +++ b/Dockerfile-apache-insert @@ -0,0 +1,34 @@ + && make install \ + \ + && cd / \ + && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ + && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ + && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ + && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ + && gpg --verify httpd.tar.bz2.asc \ + && mkdir -p /usr/src/httpd \ + && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ + && rm httpd.tar.bz2.* \ + && cd /usr/src/httpd \ + && ./configure --enable-so \ + && make -j"$(nproc)" \ + && make install \ + && cd / \ + && rm -r /usr/src/httpd \ + && mkdir -p /var/www/html \ + && sed -r ' \ + s/(DirectoryIndex index[.])html/\1php/; \ + s!/usr/local/apache2/htdocs!/var/www/html!g; \ + s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ + s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ + $ a\n\tSetHandler application/x-httpd-php\n \ + ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ + && rm /usr/local/apache2/conf/httpd.conf \ + && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ + && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ + && cd /usr/src/php \ + && make clean \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && make -j"$(nproc)" \ + && make install \ + && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/Dockerfile-apache-tail b/Dockerfile-apache-tail new file mode 100644 index 0000000000000..d9413a76c9f8b --- /dev/null +++ b/Dockerfile-apache-tail @@ -0,0 +1,8 @@ + +ENV PATH $PATH:/usr/local/apache2/bin + +WORKDIR /var/www/html +VOLUME /var/www/html + +EXPOSE 80 +CMD ["apachectl", "start", "-DFOREGROUND"] diff --git a/update.sh b/update.sh new file mode 100755 index 0000000000000..ca449532ec7c4 --- /dev/null +++ b/update.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -e + +declare -A gpgKeys +gpgKeys=( + [5.5]='0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D' +) +# see http://php.net/downloads.php + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +versions=( "$@" ) +if [ ${#versions[@]} -eq 0 ]; then + versions=( */ ) +fi +versions=( "${versions[@]%/}" ) + +packagesUrl='http://php.net/releases/index.php?serialize=1&version=5' +packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')" +curl -sSL "${packagesUrl}.gz" > "$packages" + +for version in "${versions[@]}"; do + fullVersion="$(sed -r 's/.*"filename";s:[0-9]+:"php-([^"]+)\.tar\.bz2".*/\1/' $packages)" + gpgKey="${gpgKeys[$version]}" + if [ -z "$gpgKey" ]; then + echo >&2 "ERROR: missing GPG key fingerprint for $version; try:" + echo >&2 " try looking on http://php.net/downloads.php#gpg-$version" + exit 1 + fi + + insert="$(cat "Dockerfile-apache-insert" | sed 's/[\]/\\&/g')" + ( + set -x + sed -ri ' + s/^(ENV PHP_VERSION) .*/\1 '"$fullVersion"'/; + s/^(RUN gpg .* --recv-keys) [0-9a-fA-F]*$/\1 '"$gpgKey"'/ + ' "$version/Dockerfile" + + awk -vf2="$insert" '/^\t&& make install \\$/{print f2;next}1' "$version/Dockerfile" "Dockerfile-apache-tail" > "$version/apache/Dockerfile" + ) +done + +rm "$packages" From 4c98e81721c9be84aef01de418af04a514272442 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 20 Aug 2014 17:50:02 -0600 Subject: [PATCH 03/60] Add stackbrew generator --- generate-stackbrew-library.sh | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 generate-stackbrew-library.sh diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh new file mode 100755 index 0000000000000..0d5627eaeb3e4 --- /dev/null +++ b/generate-stackbrew-library.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -e + +declare -A aliases +aliases=( + [5.5]='5 latest' +) + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +versions=( */ ) +versions=( "${versions[@]%/}" ) +url='git://github.com/docker-library/php' + +echo '# maintainer: InfoSiftr (@infosiftr)' + +for version in "${versions[@]}"; do + commit="$(git log -1 --format='format:%H' "$version")" + fullVersion="$(grep -m1 'ENV PHP_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)" + versionAliases=( $fullVersion $version ${aliases[$version]} ) + + echo + for va in "${versionAliases[@]}"; do + if [ "$va" != 'latest' ]; then + va="$va-cli" + fi + echo "$va: ${url}@${commit} $version" + done + + for variant in apache; do + commit="$(git log -1 --format='format:%H' "$version/$variant")" + echo + for va in "${versionAliases[@]}"; do + if [ "$va" = 'latest' ]; then + va="$variant" + else + va="$va-$variant" + fi + echo "$va: ${url}@${commit} $version/$variant" + done + done +done From e98835b4540c8049bdb8871656a3aaf65cbb759b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 22 Aug 2014 10:06:40 -0600 Subject: [PATCH 04/60] Match multiple keys in update.sh since we have 2+ here --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index ca449532ec7c4..d7be6512a094f 100755 --- a/update.sh +++ b/update.sh @@ -33,7 +33,7 @@ for version in "${versions[@]}"; do set -x sed -ri ' s/^(ENV PHP_VERSION) .*/\1 '"$fullVersion"'/; - s/^(RUN gpg .* --recv-keys) [0-9a-fA-F]*$/\1 '"$gpgKey"'/ + s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ ' "$version/Dockerfile" awk -vf2="$insert" '/^\t&& make install \\$/{print f2;next}1' "$version/Dockerfile" "Dockerfile-apache-tail" > "$version/apache/Dockerfile" From 88ee683d43757f302a283faf2689303c59438c28 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 22 Aug 2014 10:08:15 -0600 Subject: [PATCH 05/60] Update to 5.5.16 --- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.5/Dockerfile b/5.5/Dockerfile index e20d7ed0315a9..9fbb02ff1ba55 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -2,7 +2,7 @@ FROM buildpack-deps RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.15 +ENV PHP_VERSION 5.5.16 RUN set -x \ && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index cfe2d05cdf5a7..dd55482169b1b 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -2,7 +2,7 @@ FROM buildpack-deps RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.15 +ENV PHP_VERSION 5.5.16 RUN set -x \ && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ From 5a117c8bef3d947af3ec2321ec6b7a7d3e9ae9c7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 25 Aug 2014 14:38:21 -0600 Subject: [PATCH 06/60] Remove duplicated "try try" in update.sh --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index d7be6512a094f..d90c0c972cb26 100755 --- a/update.sh +++ b/update.sh @@ -23,7 +23,7 @@ for version in "${versions[@]}"; do fullVersion="$(sed -r 's/.*"filename";s:[0-9]+:"php-([^"]+)\.tar\.bz2".*/\1/' $packages)" gpgKey="${gpgKeys[$version]}" if [ -z "$gpgKey" ]; then - echo >&2 "ERROR: missing GPG key fingerprint for $version; try:" + echo >&2 "ERROR: missing GPG key fingerprint for $version" echo >&2 " try looking on http://php.net/downloads.php#gpg-$version" exit 1 fi From 4e7350151472b4e8ad67976a884a226d419d1951 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Mon, 25 Aug 2014 17:47:13 -0600 Subject: [PATCH 07/60] Missed an extraneous .gz --- update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.sh b/update.sh index d90c0c972cb26..aa7847a98a45a 100755 --- a/update.sh +++ b/update.sh @@ -17,7 +17,7 @@ versions=( "${versions[@]%/}" ) packagesUrl='http://php.net/releases/index.php?serialize=1&version=5' packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')" -curl -sSL "${packagesUrl}.gz" > "$packages" +curl -sSL "${packagesUrl}" > "$packages" for version in "${versions[@]}"; do fullVersion="$(sed -r 's/.*"filename";s:[0-9]+:"php-([^"]+)\.tar\.bz2".*/\1/' $packages)" From 6b54c7fa3f42f0eaade30c1bbb05d5fc2c0b39c2 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 27 Aug 2014 15:18:39 -0600 Subject: [PATCH 08/60] Add php 5.3, 5.4, and 5.6 fixing the update script --- 5.3/Dockerfile | 28 ++++++++++++++ 5.3/apache/Dockerfile | 69 +++++++++++++++++++++++++++++++++++ 5.4/Dockerfile | 27 ++++++++++++++ 5.4/apache/Dockerfile | 68 ++++++++++++++++++++++++++++++++++ 5.5/Dockerfile | 4 +- 5.5/apache/Dockerfile | 4 +- 5.6/Dockerfile | 27 ++++++++++++++ 5.6/apache/Dockerfile | 68 ++++++++++++++++++++++++++++++++++ generate-stackbrew-library.sh | 2 +- update.sh | 7 +++- 10 files changed, 297 insertions(+), 7 deletions(-) create mode 100644 5.3/Dockerfile create mode 100644 5.3/apache/Dockerfile create mode 100644 5.4/Dockerfile create mode 100644 5.4/apache/Dockerfile create mode 100644 5.6/Dockerfile create mode 100644 5.6/apache/Dockerfile diff --git a/5.3/Dockerfile b/5.3/Dockerfile new file mode 100644 index 0000000000000..f28befad152e8 --- /dev/null +++ b/5.3/Dockerfile @@ -0,0 +1,28 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 + +ENV PHP_VERSION 5.3.29 + +# php 5.3 needs older autoconf +RUN set -x \ + && apt-get update && apt-get install -y autoconf2.13 curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove autoconf2.13 curl \ + && rm -r /usr/src/php diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile new file mode 100644 index 0000000000000..be3e5aab2ec83 --- /dev/null +++ b/5.3/apache/Dockerfile @@ -0,0 +1,69 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 + +ENV PHP_VERSION 5.3.29 + +# php 5.3 needs older autoconf +RUN set -x \ + && apt-get update && apt-get install -y autoconf2.13 curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + \ + && cd / \ + && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ + && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ + && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ + && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ + && gpg --verify httpd.tar.bz2.asc \ + && mkdir -p /usr/src/httpd \ + && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ + && rm httpd.tar.bz2.* \ + && cd /usr/src/httpd \ + && ./configure --enable-so \ + && make -j"$(nproc)" \ + && make install \ + && cd / \ + && rm -r /usr/src/httpd \ + && mkdir -p /var/www/html \ + && sed -r ' \ + s/(DirectoryIndex index[.])html/\1php/; \ + s!/usr/local/apache2/htdocs!/var/www/html!g; \ + s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ + s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ + $ a\n\tSetHandler application/x-httpd-php\n \ + ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ + && rm /usr/local/apache2/conf/httpd.conf \ + && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ + && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ + && cd /usr/src/php \ + && make clean \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && make -j"$(nproc)" \ + && make install \ + && cp php.ini-development /usr/local/lib/php.ini \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove autoconf2.13 curl \ + && rm -r /usr/src/php + +ENV PATH $PATH:/usr/local/apache2/bin + +WORKDIR /var/www/html +VOLUME /var/www/html + +EXPOSE 80 +CMD ["apachectl", "start", "-DFOREGROUND"] diff --git a/5.4/Dockerfile b/5.4/Dockerfile new file mode 100644 index 0000000000000..91f67abfa1c35 --- /dev/null +++ b/5.4/Dockerfile @@ -0,0 +1,27 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D + +ENV PHP_VERSION 5.4.32 + +RUN set -x \ + && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove curl \ + && rm -r /usr/src/php diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile new file mode 100644 index 0000000000000..45feb4f3f1040 --- /dev/null +++ b/5.4/apache/Dockerfile @@ -0,0 +1,68 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D + +ENV PHP_VERSION 5.4.32 + +RUN set -x \ + && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + \ + && cd / \ + && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ + && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ + && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ + && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ + && gpg --verify httpd.tar.bz2.asc \ + && mkdir -p /usr/src/httpd \ + && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ + && rm httpd.tar.bz2.* \ + && cd /usr/src/httpd \ + && ./configure --enable-so \ + && make -j"$(nproc)" \ + && make install \ + && cd / \ + && rm -r /usr/src/httpd \ + && mkdir -p /var/www/html \ + && sed -r ' \ + s/(DirectoryIndex index[.])html/\1php/; \ + s!/usr/local/apache2/htdocs!/var/www/html!g; \ + s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ + s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ + $ a\n\tSetHandler application/x-httpd-php\n \ + ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ + && rm /usr/local/apache2/conf/httpd.conf \ + && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ + && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ + && cd /usr/src/php \ + && make clean \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && make -j"$(nproc)" \ + && make install \ + && cp php.ini-development /usr/local/lib/php.ini \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove curl \ + && rm -r /usr/src/php + +ENV PATH $PATH:/usr/local/apache2/bin + +WORKDIR /var/www/html +VOLUME /var/www/html + +EXPOSE 80 +CMD ["apachectl", "start", "-DFOREGROUND"] diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 9fbb02ff1ba55..f0d874a97cb4c 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -22,6 +22,6 @@ RUN set -x \ && ./configure --disable-cgi \ && make -j"$(nproc)" \ && make install \ - && apt-get purge -y curl \ - && apt-get autoremove -y \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index dd55482169b1b..7e69af7b055f4 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -55,8 +55,8 @@ RUN set -x \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ - && apt-get purge -y curl \ - && apt-get autoremove -y \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php ENV PATH $PATH:/usr/local/apache2/bin diff --git a/5.6/Dockerfile b/5.6/Dockerfile new file mode 100644 index 0000000000000..403958efb0675 --- /dev/null +++ b/5.6/Dockerfile @@ -0,0 +1,27 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 + +ENV PHP_VERSION 5.6.0 + +RUN set -x \ + && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove curl \ + && rm -r /usr/src/php diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile new file mode 100644 index 0000000000000..129b7a3502935 --- /dev/null +++ b/5.6/apache/Dockerfile @@ -0,0 +1,68 @@ +FROM buildpack-deps + +RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 + +ENV PHP_VERSION 5.6.0 + +RUN set -x \ + && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ + && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ + && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ + && rm *.deb \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./buildconf --force \ + && ./configure --disable-cgi \ + && make -j"$(nproc)" \ + && make install \ + \ + && cd / \ + && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ + && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ + && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ + && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ + && gpg --verify httpd.tar.bz2.asc \ + && mkdir -p /usr/src/httpd \ + && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ + && rm httpd.tar.bz2.* \ + && cd /usr/src/httpd \ + && ./configure --enable-so \ + && make -j"$(nproc)" \ + && make install \ + && cd / \ + && rm -r /usr/src/httpd \ + && mkdir -p /var/www/html \ + && sed -r ' \ + s/(DirectoryIndex index[.])html/\1php/; \ + s!/usr/local/apache2/htdocs!/var/www/html!g; \ + s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ + s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ + $ a\n\tSetHandler application/x-httpd-php\n \ + ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ + && rm /usr/local/apache2/conf/httpd.conf \ + && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ + && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ + && cd /usr/src/php \ + && make clean \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && make -j"$(nproc)" \ + && make install \ + && cp php.ini-development /usr/local/lib/php.ini \ + && dpkg -r bison libbison-dev \ + && apt-get purge -y --auto-remove curl \ + && rm -r /usr/src/php + +ENV PATH $PATH:/usr/local/apache2/bin + +WORKDIR /var/www/html +VOLUME /var/www/html + +EXPOSE 80 +CMD ["apachectl", "start", "-DFOREGROUND"] diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 0d5627eaeb3e4..72988098c24bf 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -e declare -A aliases aliases=( - [5.5]='5 latest' + [5.6]='5 latest' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" diff --git a/update.sh b/update.sh index aa7847a98a45a..847f46c19d353 100755 --- a/update.sh +++ b/update.sh @@ -3,7 +3,10 @@ set -e declare -A gpgKeys gpgKeys=( + [5.6]='6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1' [5.5]='0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D' + [5.4]='F38252826ACD957EF380D39F2F7956BC5DA04B5D' + [5.3]='0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7' ) # see http://php.net/downloads.php @@ -15,12 +18,12 @@ if [ ${#versions[@]} -eq 0 ]; then fi versions=( "${versions[@]%/}" ) -packagesUrl='http://php.net/releases/index.php?serialize=1&version=5' +packagesUrl='http://php.net/releases/index.php?serialize=1&version=5&max=100' packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')" curl -sSL "${packagesUrl}" > "$packages" for version in "${versions[@]}"; do - fullVersion="$(sed -r 's/.*"filename";s:[0-9]+:"php-([^"]+)\.tar\.bz2".*/\1/' $packages)" + fullVersion="$(sed 's/;/;\n/g' $packages | grep -e 'php-'"$version"'.*\.tar\.bz2' | sed -r 's/.*php-('"$version"'[^"]+)\.tar\.bz2.*/\1/' | sort -V | tail -1)" gpgKey="${gpgKeys[$version]}" if [ -z "$gpgKey" ]; then echo >&2 "ERROR: missing GPG key fingerprint for $version" From 3904b176167a07c8828b9a1b5b9a3ea55bd9f21d Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 3 Sep 2014 11:56:55 -0600 Subject: [PATCH 09/60] Add CMD php -a; replace awk with magic bash --- 5.3/Dockerfile | 2 ++ 5.4/Dockerfile | 2 ++ 5.5/Dockerfile | 2 ++ 5.6/Dockerfile | 2 ++ Dockerfile-apache-tail | 1 - update.sh | 7 +++++-- 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/5.3/Dockerfile b/5.3/Dockerfile index f28befad152e8..3289030b333ee 100644 --- a/5.3/Dockerfile +++ b/5.3/Dockerfile @@ -26,3 +26,5 @@ RUN set -x \ && dpkg -r bison libbison-dev \ && apt-get purge -y --auto-remove autoconf2.13 curl \ && rm -r /usr/src/php + +CMD ["php", "-a"] diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 91f67abfa1c35..1900f24e1f29c 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -25,3 +25,5 @@ RUN set -x \ && dpkg -r bison libbison-dev \ && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php + +CMD ["php", "-a"] diff --git a/5.5/Dockerfile b/5.5/Dockerfile index f0d874a97cb4c..3bf2497c33403 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -25,3 +25,5 @@ RUN set -x \ && dpkg -r bison libbison-dev \ && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php + +CMD ["php", "-a"] diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 403958efb0675..63a2df857e506 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -25,3 +25,5 @@ RUN set -x \ && dpkg -r bison libbison-dev \ && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php + +CMD ["php", "-a"] diff --git a/Dockerfile-apache-tail b/Dockerfile-apache-tail index d9413a76c9f8b..814a21f23582d 100644 --- a/Dockerfile-apache-tail +++ b/Dockerfile-apache-tail @@ -1,4 +1,3 @@ - ENV PATH $PATH:/usr/local/apache2/bin WORKDIR /var/www/html diff --git a/update.sh b/update.sh index 847f46c19d353..937a83070575d 100755 --- a/update.sh +++ b/update.sh @@ -31,7 +31,9 @@ for version in "${versions[@]}"; do exit 1 fi - insert="$(cat "Dockerfile-apache-insert" | sed 's/[\]/\\&/g')" + dockerfile="$( cat "$version/Dockerfile")" + apacheInsert="$(cat "Dockerfile-apache-insert")" + apacheTail="$(cat "Dockerfile-apache-tail")" ( set -x sed -ri ' @@ -39,7 +41,8 @@ for version in "${versions[@]}"; do s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ ' "$version/Dockerfile" - awk -vf2="$insert" '/^\t&& make install \\$/{print f2;next}1' "$version/Dockerfile" "Dockerfile-apache-tail" > "$version/apache/Dockerfile" + apacheDockerfile="${dockerfile/?\&\& make install \\/$apacheInsert}" + echo "${apacheDockerfile/CMD*/$apacheTail}" > "$version/apache/Dockerfile" ) done From f36d64e65bb7288a3de0c0c91f21a8ff6dd2b7f4 Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Fri, 5 Sep 2014 15:55:10 -0600 Subject: [PATCH 10/60] Change default command to httpd --- 5.3/apache/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- Dockerfile-apache-tail | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index be3e5aab2ec83..89c469f495de6 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -66,4 +66,4 @@ WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["apachectl", "start", "-DFOREGROUND"] +CMD ["httpd", "-DFOREGROUND"] diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 45feb4f3f1040..fb5d8463b6d7b 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -65,4 +65,4 @@ WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["apachectl", "start", "-DFOREGROUND"] +CMD ["httpd", "-DFOREGROUND"] diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 7e69af7b055f4..b63bf9e73abc7 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -65,4 +65,4 @@ WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["apachectl", "start", "-DFOREGROUND"] +CMD ["httpd", "-DFOREGROUND"] diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 129b7a3502935..f340083192359 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -65,4 +65,4 @@ WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["apachectl", "start", "-DFOREGROUND"] +CMD ["httpd", "-DFOREGROUND"] diff --git a/Dockerfile-apache-tail b/Dockerfile-apache-tail index 814a21f23582d..4c49c88716f31 100644 --- a/Dockerfile-apache-tail +++ b/Dockerfile-apache-tail @@ -4,4 +4,4 @@ WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["apachectl", "start", "-DFOREGROUND"] +CMD ["httpd", "-DFOREGROUND"] From 595b0f49201ca210ae25c711e559ddbf70c20641 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 10 Sep 2014 17:09:55 -0600 Subject: [PATCH 11/60] Add license (Expat) --- LICENSE | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000..14383527d284f --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ + Copyright (c) 2014 Docker, Inc. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From e19f15271b1cbe9d3e5c9f0c552beca9579f0677 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Thu, 11 Sep 2014 13:19:04 +0100 Subject: [PATCH 12/60] use php.net as host, to allow mirror redirects Prevents us2.php.net from getting all of the traffic. --- 5.3/Dockerfile | 4 ++-- 5.3/apache/Dockerfile | 4 ++-- 5.4/Dockerfile | 4 ++-- 5.4/apache/Dockerfile | 4 ++-- 5.5/Dockerfile | 4 ++-- 5.5/apache/Dockerfile | 4 ++-- 5.6/Dockerfile | 4 ++-- 5.6/apache/Dockerfile | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/5.3/Dockerfile b/5.3/Dockerfile index 3289030b333ee..501c37e209fa5 100644 --- a/5.3/Dockerfile +++ b/5.3/Dockerfile @@ -12,8 +12,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index 89c469f495de6..8d092a9f09237 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -12,8 +12,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 1900f24e1f29c..b7ac93fa15ce1 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index fb5d8463b6d7b..9497629e7805f 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 3bf2497c33403..926fb5b2249b7 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index b63bf9e73abc7..2430e73416ecd 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 63a2df857e506..d95137aca96cd 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index f340083192359..e74aaa140e556 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -11,8 +11,8 @@ RUN set -x \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ && rm *.deb \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://us2.php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ From 8e361ec2017cf08fc896fd0a28da3b3742cebb09 Mon Sep 17 00:00:00 2001 From: Matthew Gallagher Date: Fri, 12 Sep 2014 01:29:12 -0400 Subject: [PATCH 13/60] Added compile option --with-mysqli in versions with Apache --- 5.3/apache/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- Dockerfile-apache-insert | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index 8d092a9f09237..05610cb303900 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -52,7 +52,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 9497629e7805f..e3f2734540b40 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -51,7 +51,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 2430e73416ecd..32a79ca45eb62 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -51,7 +51,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index e74aaa140e556..8287b0b2a4111 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -51,7 +51,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/Dockerfile-apache-insert b/Dockerfile-apache-insert index 87f0e17a6147c..5e3249a8b8da0 100644 --- a/Dockerfile-apache-insert +++ b/Dockerfile-apache-insert @@ -28,7 +28,7 @@ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ From 7d61fd53df92f93172ede35a692fd5f645a0252c Mon Sep 17 00:00:00 2001 From: Matthew Gallagher Date: Fri, 12 Sep 2014 17:49:19 -0400 Subject: [PATCH 14/60] Added mysql PDO support to compile flags in versions with Apache --- 5.3/apache/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- Dockerfile-apache-insert | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index 05610cb303900..257a88bedfe34 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -52,7 +52,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index e3f2734540b40..c9058b84497d2 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -51,7 +51,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 32a79ca45eb62..c1f264eacfa6a 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -51,7 +51,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 8287b0b2a4111..e06c4d828c351 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -51,7 +51,7 @@ RUN set -x \ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/Dockerfile-apache-insert b/Dockerfile-apache-insert index 5e3249a8b8da0..e40865aea08c3 100644 --- a/Dockerfile-apache-insert +++ b/Dockerfile-apache-insert @@ -28,7 +28,7 @@ && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ && cd /usr/src/php \ && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli \ + && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && cp php.ini-development /usr/local/lib/php.ini \ From 7819c242fd0521684b31ff0b33707132ca1bd9c6 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 15 Sep 2014 11:31:14 -0600 Subject: [PATCH 15/60] Simplify "-apache" images by using the Debian apache2 packages --- 5.3/Dockerfile | 17 ++++++++--- 5.3/apache/Dockerfile | 63 +++++++++++++++------------------------- 5.3/apache/apache2.conf | 57 ++++++++++++++++++++++++++++++++++++ 5.4/Dockerfile | 15 +++++++--- 5.4/apache/Dockerfile | 61 ++++++++++++++------------------------ 5.4/apache/apache2.conf | 57 ++++++++++++++++++++++++++++++++++++ 5.5/Dockerfile | 15 +++++++--- 5.5/apache/Dockerfile | 61 ++++++++++++++------------------------ 5.5/apache/apache2.conf | 57 ++++++++++++++++++++++++++++++++++++ 5.6/Dockerfile | 15 +++++++--- 5.6/apache/Dockerfile | 61 ++++++++++++++------------------------ 5.6/apache/apache2.conf | 57 ++++++++++++++++++++++++++++++++++++ Dockerfile-apache-insert | 34 ---------------------- Dockerfile-apache-tail | 7 ----- apache2.conf | 57 ++++++++++++++++++++++++++++++++++++ update.sh | 26 +++++++++++++---- 16 files changed, 438 insertions(+), 222 deletions(-) create mode 100644 5.3/apache/apache2.conf create mode 100644 5.4/apache/apache2.conf create mode 100644 5.5/apache/apache2.conf create mode 100644 5.6/apache/apache2.conf delete mode 100644 Dockerfile-apache-insert delete mode 100644 Dockerfile-apache-tail create mode 100644 apache2.conf diff --git a/5.3/Dockerfile b/5.3/Dockerfile index 501c37e209fa5..9eee7c4b07e8b 100644 --- a/5.3/Dockerfile +++ b/5.3/Dockerfile @@ -1,4 +1,9 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 @@ -6,7 +11,7 @@ ENV PHP_VERSION 5.3.29 # php 5.3 needs older autoconf RUN set -x \ - && apt-get update && apt-get install -y autoconf2.13 curl && rm -r /var/lib/apt/lists/* \ + && apt-get update && apt-get install -y autoconf2.13 && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -16,15 +21,19 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove autoconf2.13 curl \ + && apt-get purge -y --auto-remove autoconf2.13 \ && rm -r /usr/src/php CMD ["php", "-a"] diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index 257a88bedfe34..8c3120ce1890a 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -1,4 +1,18 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* + +RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + +# Apache + PHP requires preforking Apache for best results +RUN a2dismod mpm_event && a2enmod mpm_prefork + +RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist +COPY apache2.conf /etc/apache2/apache2.conf +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 @@ -6,7 +20,7 @@ ENV PHP_VERSION 5.3.29 # php 5.3 needs older autoconf RUN set -x \ - && apt-get update && apt-get install -y autoconf2.13 curl && rm -r /var/lib/apt/lists/* \ + && apt-get update && apt-get install -y autoconf2.13 && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -16,54 +30,23 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ - \ - && cd / \ - && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ - && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ - && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ - && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ - && gpg --verify httpd.tar.bz2.asc \ - && mkdir -p /usr/src/httpd \ - && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ - && rm httpd.tar.bz2.* \ - && cd /usr/src/httpd \ - && ./configure --enable-so \ - && make -j"$(nproc)" \ - && make install \ - && cd / \ - && rm -r /usr/src/httpd \ - && mkdir -p /var/www/html \ - && sed -r ' \ - s/(DirectoryIndex index[.])html/\1php/; \ - s!/usr/local/apache2/htdocs!/var/www/html!g; \ - s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ - s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ - $ a\n\tSetHandler application/x-httpd-php\n \ - ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ - && rm /usr/local/apache2/conf/httpd.conf \ - && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ - && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ - && cd /usr/src/php \ - && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ - && make -j"$(nproc)" \ - && make install \ - && cp php.ini-development /usr/local/lib/php.ini \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove autoconf2.13 curl \ + && apt-get purge -y --auto-remove autoconf2.13 \ && rm -r /usr/src/php -ENV PATH $PATH:/usr/local/apache2/bin - WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["httpd", "-DFOREGROUND"] +CMD ["apache2", "-DFOREGROUND"] diff --git a/5.3/apache/apache2.conf b/5.3/apache/apache2.conf new file mode 100644 index 0000000000000..85ef37884d30a --- /dev/null +++ b/5.3/apache/apache2.conf @@ -0,0 +1,57 @@ +# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf + +Mutex file:/var/lock/apache2 default +PidFile /var/run/apache2/apache2.pid +Timeout 300 +KeepAlive On +MaxKeepAliveRequests 100 +KeepAliveTimeout 5 +User www-data +Group www-data +HostnameLookups Off +ErrorLog /proc/self/fd/2 +LogLevel warn + +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# ports.conf +Listen 80 + + Listen 443 + + + Listen 443 + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +AccessFileName .htaccess + + Require all denied + + +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +CustomLog /proc/self/fd/1 combined + + + SetHandler application/x-httpd-php + +DirectoryIndex index.php + +DocumentRoot /var/www/html diff --git a/5.4/Dockerfile b/5.4/Dockerfile index b7ac93fa15ce1..b41e9283f9838 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -1,11 +1,15 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.32 RUN set -x \ - && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -15,15 +19,18 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php CMD ["php", "-a"] diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index c9058b84497d2..8631082bd2462 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -1,11 +1,24 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* + +RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + +# Apache + PHP requires preforking Apache for best results +RUN a2dismod mpm_event && a2enmod mpm_prefork + +RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist +COPY apache2.conf /etc/apache2/apache2.conf +#### RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.32 RUN set -x \ - && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -15,54 +28,22 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ - \ - && cd / \ - && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ - && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ - && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ - && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ - && gpg --verify httpd.tar.bz2.asc \ - && mkdir -p /usr/src/httpd \ - && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ - && rm httpd.tar.bz2.* \ - && cd /usr/src/httpd \ - && ./configure --enable-so \ - && make -j"$(nproc)" \ - && make install \ - && cd / \ - && rm -r /usr/src/httpd \ - && mkdir -p /var/www/html \ - && sed -r ' \ - s/(DirectoryIndex index[.])html/\1php/; \ - s!/usr/local/apache2/htdocs!/var/www/html!g; \ - s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ - s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ - $ a\n\tSetHandler application/x-httpd-php\n \ - ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ - && rm /usr/local/apache2/conf/httpd.conf \ - && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ - && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ - && cd /usr/src/php \ - && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ - && make -j"$(nproc)" \ - && make install \ - && cp php.ini-development /usr/local/lib/php.ini \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php -ENV PATH $PATH:/usr/local/apache2/bin - WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["httpd", "-DFOREGROUND"] +CMD ["apache2", "-DFOREGROUND"] diff --git a/5.4/apache/apache2.conf b/5.4/apache/apache2.conf new file mode 100644 index 0000000000000..85ef37884d30a --- /dev/null +++ b/5.4/apache/apache2.conf @@ -0,0 +1,57 @@ +# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf + +Mutex file:/var/lock/apache2 default +PidFile /var/run/apache2/apache2.pid +Timeout 300 +KeepAlive On +MaxKeepAliveRequests 100 +KeepAliveTimeout 5 +User www-data +Group www-data +HostnameLookups Off +ErrorLog /proc/self/fd/2 +LogLevel warn + +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# ports.conf +Listen 80 + + Listen 443 + + + Listen 443 + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +AccessFileName .htaccess + + Require all denied + + +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +CustomLog /proc/self/fd/1 combined + + + SetHandler application/x-httpd-php + +DirectoryIndex index.php + +DocumentRoot /var/www/html diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 926fb5b2249b7..f5ae2c2e5a382 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -1,11 +1,15 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.16 RUN set -x \ - && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -15,15 +19,18 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php CMD ["php", "-a"] diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index c1f264eacfa6a..0501a930f53fb 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -1,11 +1,24 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* + +RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + +# Apache + PHP requires preforking Apache for best results +RUN a2dismod mpm_event && a2enmod mpm_prefork + +RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist +COPY apache2.conf /etc/apache2/apache2.conf +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.16 RUN set -x \ - && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -15,54 +28,22 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ - \ - && cd / \ - && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ - && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ - && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ - && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ - && gpg --verify httpd.tar.bz2.asc \ - && mkdir -p /usr/src/httpd \ - && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ - && rm httpd.tar.bz2.* \ - && cd /usr/src/httpd \ - && ./configure --enable-so \ - && make -j"$(nproc)" \ - && make install \ - && cd / \ - && rm -r /usr/src/httpd \ - && mkdir -p /var/www/html \ - && sed -r ' \ - s/(DirectoryIndex index[.])html/\1php/; \ - s!/usr/local/apache2/htdocs!/var/www/html!g; \ - s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ - s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ - $ a\n\tSetHandler application/x-httpd-php\n \ - ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ - && rm /usr/local/apache2/conf/httpd.conf \ - && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ - && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ - && cd /usr/src/php \ - && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ - && make -j"$(nproc)" \ - && make install \ - && cp php.ini-development /usr/local/lib/php.ini \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php -ENV PATH $PATH:/usr/local/apache2/bin - WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["httpd", "-DFOREGROUND"] +CMD ["apache2", "-DFOREGROUND"] diff --git a/5.5/apache/apache2.conf b/5.5/apache/apache2.conf new file mode 100644 index 0000000000000..85ef37884d30a --- /dev/null +++ b/5.5/apache/apache2.conf @@ -0,0 +1,57 @@ +# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf + +Mutex file:/var/lock/apache2 default +PidFile /var/run/apache2/apache2.pid +Timeout 300 +KeepAlive On +MaxKeepAliveRequests 100 +KeepAliveTimeout 5 +User www-data +Group www-data +HostnameLookups Off +ErrorLog /proc/self/fd/2 +LogLevel warn + +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# ports.conf +Listen 80 + + Listen 443 + + + Listen 443 + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +AccessFileName .htaccess + + Require all denied + + +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +CustomLog /proc/self/fd/1 combined + + + SetHandler application/x-httpd-php + +DirectoryIndex index.php + +DocumentRoot /var/www/html diff --git a/5.6/Dockerfile b/5.6/Dockerfile index d95137aca96cd..7b030d6453c2a 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -1,11 +1,15 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.0 RUN set -x \ - && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -15,15 +19,18 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php CMD ["php", "-a"] diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index e06c4d828c351..67b5263d8df01 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -1,11 +1,24 @@ -FROM buildpack-deps +FROM buildpack-deps:jessie + +RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* + +#### +RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* + +RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + +# Apache + PHP requires preforking Apache for best results +RUN a2dismod mpm_event && a2enmod mpm_prefork + +RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist +COPY apache2.conf /etc/apache2/apache2.conf +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.0 RUN set -x \ - && apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ @@ -15,54 +28,22 @@ RUN set -x \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ && mkdir -p /usr/src/php \ - && tar -xvf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./buildconf --force \ && ./configure --disable-cgi \ + $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-mysql \ + --with-mysqli \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ - \ - && cd / \ - && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ - && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ - && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ - && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ - && gpg --verify httpd.tar.bz2.asc \ - && mkdir -p /usr/src/httpd \ - && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ - && rm httpd.tar.bz2.* \ - && cd /usr/src/httpd \ - && ./configure --enable-so \ - && make -j"$(nproc)" \ - && make install \ - && cd / \ - && rm -r /usr/src/httpd \ - && mkdir -p /var/www/html \ - && sed -r ' \ - s/(DirectoryIndex index[.])html/\1php/; \ - s!/usr/local/apache2/htdocs!/var/www/html!g; \ - s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ - s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ - $ a\n\tSetHandler application/x-httpd-php\n \ - ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ - && rm /usr/local/apache2/conf/httpd.conf \ - && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ - && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ - && cd /usr/src/php \ - && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ - && make -j"$(nproc)" \ - && make install \ - && cp php.ini-development /usr/local/lib/php.ini \ && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove curl \ && rm -r /usr/src/php -ENV PATH $PATH:/usr/local/apache2/bin - WORKDIR /var/www/html VOLUME /var/www/html EXPOSE 80 -CMD ["httpd", "-DFOREGROUND"] +CMD ["apache2", "-DFOREGROUND"] diff --git a/5.6/apache/apache2.conf b/5.6/apache/apache2.conf new file mode 100644 index 0000000000000..85ef37884d30a --- /dev/null +++ b/5.6/apache/apache2.conf @@ -0,0 +1,57 @@ +# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf + +Mutex file:/var/lock/apache2 default +PidFile /var/run/apache2/apache2.pid +Timeout 300 +KeepAlive On +MaxKeepAliveRequests 100 +KeepAliveTimeout 5 +User www-data +Group www-data +HostnameLookups Off +ErrorLog /proc/self/fd/2 +LogLevel warn + +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# ports.conf +Listen 80 + + Listen 443 + + + Listen 443 + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +AccessFileName .htaccess + + Require all denied + + +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +CustomLog /proc/self/fd/1 combined + + + SetHandler application/x-httpd-php + +DirectoryIndex index.php + +DocumentRoot /var/www/html diff --git a/Dockerfile-apache-insert b/Dockerfile-apache-insert deleted file mode 100644 index e40865aea08c3..0000000000000 --- a/Dockerfile-apache-insert +++ /dev/null @@ -1,34 +0,0 @@ - && make install \ - \ - && cd / \ - && gpg --keyserver pgp.mit.edu --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \ - && apt-get update && apt-get install -y libapr1-dev libaprutil1-dev && rm -r /var/lib/apt/lists/* \ - && curl -SL "http://apache.osuosl.org/httpd/httpd-2.4.10.tar.bz2" -o httpd.tar.bz2 \ - && curl -SL "https://www.apache.org/dist/httpd/httpd-2.4.10.tar.bz2.asc" -o httpd.tar.bz2.asc \ - && gpg --verify httpd.tar.bz2.asc \ - && mkdir -p /usr/src/httpd \ - && tar -xvf httpd.tar.bz2 -C /usr/src/httpd --strip-components=1 \ - && rm httpd.tar.bz2.* \ - && cd /usr/src/httpd \ - && ./configure --enable-so \ - && make -j"$(nproc)" \ - && make install \ - && cd / \ - && rm -r /usr/src/httpd \ - && mkdir -p /var/www/html \ - && sed -r ' \ - s/(DirectoryIndex index[.])html/\1php/; \ - s!/usr/local/apache2/htdocs!/var/www/html!g; \ - s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ - s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ - $ a\n\tSetHandler application/x-httpd-php\n \ - ' /usr/local/apache2/conf/httpd.conf > /etc/apache2/httpd.conf \ - && rm /usr/local/apache2/conf/httpd.conf \ - && ln -s /etc/apache2/httpd.conf /usr/local/apache2/conf/httpd.conf \ - && echo "Hello, World!'; ?>" >> /var/www/html/index.php \ - && cd /usr/src/php \ - && make clean \ - && ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql \ - && make -j"$(nproc)" \ - && make install \ - && cp php.ini-development /usr/local/lib/php.ini \ diff --git a/Dockerfile-apache-tail b/Dockerfile-apache-tail deleted file mode 100644 index 4c49c88716f31..0000000000000 --- a/Dockerfile-apache-tail +++ /dev/null @@ -1,7 +0,0 @@ -ENV PATH $PATH:/usr/local/apache2/bin - -WORKDIR /var/www/html -VOLUME /var/www/html - -EXPOSE 80 -CMD ["httpd", "-DFOREGROUND"] diff --git a/apache2.conf b/apache2.conf new file mode 100644 index 0000000000000..85ef37884d30a --- /dev/null +++ b/apache2.conf @@ -0,0 +1,57 @@ +# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf + +Mutex file:/var/lock/apache2 default +PidFile /var/run/apache2/apache2.pid +Timeout 300 +KeepAlive On +MaxKeepAliveRequests 100 +KeepAliveTimeout 5 +User www-data +Group www-data +HostnameLookups Off +ErrorLog /proc/self/fd/2 +LogLevel warn + +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +# ports.conf +Listen 80 + + Listen 443 + + + Listen 443 + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +AccessFileName .htaccess + + Require all denied + + +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%h %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +CustomLog /proc/self/fd/1 combined + + + SetHandler application/x-httpd-php + +DirectoryIndex index.php + +DocumentRoot /var/www/html diff --git a/update.sh b/update.sh index 937a83070575d..8bcf98b69fb9c 100755 --- a/update.sh +++ b/update.sh @@ -31,9 +31,26 @@ for version in "${versions[@]}"; do exit 1 fi - dockerfile="$( cat "$version/Dockerfile")" - apacheInsert="$(cat "Dockerfile-apache-insert")" - apacheTail="$(cat "Dockerfile-apache-tail")" + awk '$1 != "CMD" { print } $1 == "####" && c == 0 { c = 1; system("cat") }' "$version/Dockerfile" > "$version/apache/Dockerfile" <<-'EOD' + RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* + + RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + + # Apache + PHP requires preforking Apache for best results + RUN a2dismod mpm_event && a2enmod mpm_prefork + + RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist + COPY apache2.conf /etc/apache2/apache2.conf + EOD + + cat >> "$version/apache/Dockerfile" <<-'EOD' + WORKDIR /var/www/html + VOLUME /var/www/html + + EXPOSE 80 + CMD ["apache2", "-DFOREGROUND"] + EOD + ( set -x sed -ri ' @@ -41,8 +58,7 @@ for version in "${versions[@]}"; do s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ ' "$version/Dockerfile" - apacheDockerfile="${dockerfile/?\&\& make install \\/$apacheInsert}" - echo "${apacheDockerfile/CMD*/$apacheTail}" > "$version/apache/Dockerfile" + cp apache2.conf "$version/apache/" ) done From fbac56b1889188f9dd5d124a0fefca7aa1058aa2 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 22 Sep 2014 10:43:29 -0600 Subject: [PATCH 16/60] Update versions --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index b41e9283f9838..832a559bf6185 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.32 +ENV PHP_VERSION 5.4.33 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 8631082bd2462..48a388086eeb1 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -16,7 +16,7 @@ COPY apache2.conf /etc/apache2/apache2.conf RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.32 +ENV PHP_VERSION 5.4.33 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index f5ae2c2e5a382..249696817c038 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.16 +ENV PHP_VERSION 5.5.17 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 0501a930f53fb..cdf7f9d4b79ab 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -16,7 +16,7 @@ COPY apache2.conf /etc/apache2/apache2.conf RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.16 +ENV PHP_VERSION 5.5.17 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ From 28bebceb07d8c70702e83f6f0942edb6dcc7514d Mon Sep 17 00:00:00 2001 From: Rogerio Prado de Jesus Date: Sat, 4 Oct 2014 03:06:21 -0300 Subject: [PATCH 17/60] Update 5.6 version - fix #11 Signed-off-by: Rogerio Prado de Jesus --- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 7b030d6453c2a..80f6977a12197 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.0 +ENV PHP_VERSION 5.6.1 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 67b5263d8df01..b33e020d4d7e4 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -16,7 +16,7 @@ COPY apache2.conf /etc/apache2/apache2.conf RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.0 +ENV PHP_VERSION 5.6.1 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ From 9fabd6a9d930930c25f228f09e26aecb13f92e43 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 7 Oct 2014 16:41:32 -0600 Subject: [PATCH 18/60] =?UTF-8?q?Add=20more=20tags,=20thanks=20to=20J?= =?UTF-8?q?=C3=A9r=C3=B4me?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generate-stackbrew-library.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 72988098c24bf..c555f49b39cb9 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -21,11 +21,16 @@ for version in "${versions[@]}"; do echo for va in "${versionAliases[@]}"; do - if [ "$va" != 'latest' ]; then + if [ "$va" = 'latest' ]; then + va='cli' + else va="$va-cli" fi echo "$va: ${url}@${commit} $version" done + for va in "${versionAliases[@]}"; do + echo "$va: ${url}@${commit} $version" + done for variant in apache; do commit="$(git log -1 --format='format:%H' "$version/$variant")" From 6b0affa0c5a8cc1cbbd8b1110f239a226a137c97 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 7 Oct 2014 17:03:10 -0600 Subject: [PATCH 19/60] Remove the `VOLUME` definition from the apache variants, since it doesn't make sense in the general case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is another one thanks to Jérôme... --- 5.3/apache/Dockerfile | 1 - 5.4/apache/Dockerfile | 1 - 5.5/apache/Dockerfile | 1 - 5.6/apache/Dockerfile | 1 - update.sh | 1 - 5 files changed, 5 deletions(-) diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index 8c3120ce1890a..902f2690414e1 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -46,7 +46,6 @@ RUN set -x \ && rm -r /usr/src/php WORKDIR /var/www/html -VOLUME /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 48a388086eeb1..35d72fc48388e 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -43,7 +43,6 @@ RUN set -x \ && rm -r /usr/src/php WORKDIR /var/www/html -VOLUME /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index cdf7f9d4b79ab..9a39c6c2edc98 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -43,7 +43,6 @@ RUN set -x \ && rm -r /usr/src/php WORKDIR /var/www/html -VOLUME /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index b33e020d4d7e4..23291e9274941 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -43,7 +43,6 @@ RUN set -x \ && rm -r /usr/src/php WORKDIR /var/www/html -VOLUME /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] diff --git a/update.sh b/update.sh index 8bcf98b69fb9c..789f369d1f689 100755 --- a/update.sh +++ b/update.sh @@ -45,7 +45,6 @@ for version in "${versions[@]}"; do cat >> "$version/apache/Dockerfile" <<-'EOD' WORKDIR /var/www/html - VOLUME /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] From babf5469125c2302c8076e9d75399e4a501f8b5c Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Thu, 9 Oct 2014 22:11:01 +0200 Subject: [PATCH 20/60] Add open-ssl option --- 5.5/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 249696817c038..70cefd3e5bdc0 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -28,6 +28,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 6527e41240379ce1112b629a505ef9752f42a64f Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Thu, 9 Oct 2014 22:46:36 +0200 Subject: [PATCH 21/60] add option ssl on apache --- 5.5/apache/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 9a39c6c2edc98..4c206fb365d59 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -37,6 +37,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 646ff233711578d0e9ee98bde8af7ac311c57cf3 Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Fri, 10 Oct 2014 22:53:10 +0200 Subject: [PATCH 22/60] add openSSL --- 5.3/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.3/Dockerfile b/5.3/Dockerfile index 9eee7c4b07e8b..c0c506edcdc2a 100644 --- a/5.3/Dockerfile +++ b/5.3/Dockerfile @@ -30,6 +30,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 1317deb6f7ca226250e2e4d75e41e3603136e574 Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Fri, 10 Oct 2014 22:53:40 +0200 Subject: [PATCH 23/60] add openSSL --- 5.3/apache/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile index 902f2690414e1..e8d075e0aa4fc 100644 --- a/5.3/apache/Dockerfile +++ b/5.3/apache/Dockerfile @@ -39,6 +39,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 7daab7cc1ef111675c1ffb1339dcf72302a62fde Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Fri, 10 Oct 2014 22:53:58 +0200 Subject: [PATCH 24/60] add openSSL --- 5.4/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 832a559bf6185..053b192d1edbe 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -28,6 +28,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 9fc452451b227d1d20b77183cacc26906c9f669d Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Fri, 10 Oct 2014 22:54:15 +0200 Subject: [PATCH 25/60] add openSSL --- 5.4/apache/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 35d72fc48388e..1e6336e7f3077 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -37,6 +37,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From ccf611429545d87a37deaa5b0cb18075a9ebcec5 Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Fri, 10 Oct 2014 22:54:35 +0200 Subject: [PATCH 26/60] add openSSL --- 5.6/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 80f6977a12197..c615bd7068a3f 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -28,6 +28,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 524908779e1de87ab8fbd50f544c798782d8fc06 Mon Sep 17 00:00:00 2001 From: Cuenot Damien Date: Fri, 10 Oct 2014 22:54:54 +0200 Subject: [PATCH 27/60] add openSSL --- 5.6/apache/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 23291e9274941..31508a47ad2e7 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -37,6 +37,7 @@ RUN set -x \ --with-mysql \ --with-mysqli \ --with-pdo-mysql \ + --with-openssl \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 8814c6a7888ffa521de4d8d06454e29992b87dc7 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 15 Oct 2014 15:01:24 -0600 Subject: [PATCH 28/60] Drop older php 5.3 it fails when trying to build with ssl --- 5.3/Dockerfile | 40 ----------------------------- 5.3/apache/Dockerfile | 52 ------------------------------------- 5.3/apache/apache2.conf | 57 ----------------------------------------- 3 files changed, 149 deletions(-) delete mode 100644 5.3/Dockerfile delete mode 100644 5.3/apache/Dockerfile delete mode 100644 5.3/apache/apache2.conf diff --git a/5.3/Dockerfile b/5.3/Dockerfile deleted file mode 100644 index c0c506edcdc2a..0000000000000 --- a/5.3/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM buildpack-deps:jessie - -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* - -#### -#### - -RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 - -ENV PHP_VERSION 5.3.29 - -# php 5.3 needs older autoconf -RUN set -x \ - && apt-get update && apt-get install -y autoconf2.13 && rm -r /var/lib/apt/lists/* \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ - && mkdir -p /usr/src/php \ - && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ - && cd /usr/src/php \ - && ./buildconf --force \ - && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ - --with-mysql \ - --with-mysqli \ - --with-pdo-mysql \ - --with-openssl \ - && make -j"$(nproc)" \ - && make install \ - && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove autoconf2.13 \ - && rm -r /usr/src/php - -CMD ["php", "-a"] diff --git a/5.3/apache/Dockerfile b/5.3/apache/Dockerfile deleted file mode 100644 index e8d075e0aa4fc..0000000000000 --- a/5.3/apache/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM buildpack-deps:jessie - -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* - -#### -RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* - -RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html - -# Apache + PHP requires preforking Apache for best results -RUN a2dismod mpm_event && a2enmod mpm_prefork - -RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist -COPY apache2.conf /etc/apache2/apache2.conf -#### - -RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 - -ENV PHP_VERSION 5.3.29 - -# php 5.3 needs older autoconf -RUN set -x \ - && apt-get update && apt-get install -y autoconf2.13 && rm -r /var/lib/apt/lists/* \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ - && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ - && gpg --verify php.tar.bz2.asc \ - && mkdir -p /usr/src/php \ - && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ - && rm php.tar.bz2* \ - && cd /usr/src/php \ - && ./buildconf --force \ - && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ - --with-mysql \ - --with-mysqli \ - --with-pdo-mysql \ - --with-openssl \ - && make -j"$(nproc)" \ - && make install \ - && dpkg -r bison libbison-dev \ - && apt-get purge -y --auto-remove autoconf2.13 \ - && rm -r /usr/src/php - -WORKDIR /var/www/html - -EXPOSE 80 -CMD ["apache2", "-DFOREGROUND"] diff --git a/5.3/apache/apache2.conf b/5.3/apache/apache2.conf deleted file mode 100644 index 85ef37884d30a..0000000000000 --- a/5.3/apache/apache2.conf +++ /dev/null @@ -1,57 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /proc/self/fd/2 -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -# ports.conf -Listen 80 - - Listen 443 - - - Listen 443 - - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - Options Indexes FollowSymLinks - AllowOverride All - Require all granted - - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /proc/self/fd/1 combined - - - SetHandler application/x-httpd-php - -DirectoryIndex index.php - -DocumentRoot /var/www/html From b8c53deb443672d19db7776ee074ef8449016bbe Mon Sep 17 00:00:00 2001 From: Rogerio Prado de Jesus Date: Sat, 18 Oct 2014 07:55:43 -0300 Subject: [PATCH 29/60] Bump 5.6.2 - fix #21 fix #21 Signed-off-by: Rogerio Prado de Jesus --- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index c615bd7068a3f..231765a78adf8 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.1 +ENV PHP_VERSION 5.6.2 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 31508a47ad2e7..6e0dcdbddb0c3 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -16,7 +16,7 @@ COPY apache2.conf /etc/apache2/apache2.conf RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.1 +ENV PHP_VERSION 5.6.2 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ From 7626c94cfab5e5431860473047330026ca4b6134 Mon Sep 17 00:00:00 2001 From: Rogerio Prado de Jesus Date: Sat, 18 Oct 2014 08:16:40 -0300 Subject: [PATCH 30/60] Bump 5.4.34 - fix docker-library#23 fix docker-library#23 Signed-off-by: Rogerio Prado de Jesus --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 053b192d1edbe..0c10b1b2424b9 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.33 +ENV PHP_VERSION 5.4.34 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 1e6336e7f3077..c80eab4f5c1a0 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -16,7 +16,7 @@ COPY apache2.conf /etc/apache2/apache2.conf RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.33 +ENV PHP_VERSION 5.4.34 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ From 7c248a3108826ef5153f95ef721544528623f429 Mon Sep 17 00:00:00 2001 From: Rogerio Prado de Jesus Date: Sat, 18 Oct 2014 08:03:12 -0300 Subject: [PATCH 31/60] Bump 5.5.18 - fix docker-library#22 fix docker-library#22 Signed-off-by: Rogerio Prado de Jesus --- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 70cefd3e5bdc0..2153567c6abb1 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.17 +ENV PHP_VERSION 5.5.18 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 4c206fb365d59..39bcc5f906356 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -16,7 +16,7 @@ COPY apache2.conf /etc/apache2/apache2.conf RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.17 +ENV PHP_VERSION 5.5.18 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ From f8a3ea57872453063f6416d1a1e92011daa19a0e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 20 Oct 2014 10:30:05 -0600 Subject: [PATCH 32/60] Minor version bumps --- 5.4/Dockerfile | 2 +- 5.5/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 053b192d1edbe..0c10b1b2424b9 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.33 +ENV PHP_VERSION 5.4.34 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 70cefd3e5bdc0..2153567c6abb1 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.17 +ENV PHP_VERSION 5.5.18 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index c615bd7068a3f..231765a78adf8 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.1 +ENV PHP_VERSION 5.6.2 RUN set -x \ && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ From d21459dd50dbfda473f35891731e8931e3997db8 Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Fri, 24 Oct 2014 15:33:21 -0600 Subject: [PATCH 33/60] Add additional modules to include --- 5.6/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 231765a78adf8..f585b0958b3c3 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -25,10 +25,13 @@ RUN set -x \ && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-curl \ + --with-gd \ + --with-gzip \ --with-mysql \ --with-mysqli \ - --with-pdo-mysql \ --with-openssl \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From cfa9eab11550fd0242ccc9a556868fff8ed52dd4 Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Fri, 24 Oct 2014 16:46:42 -0600 Subject: [PATCH 34/60] Add additional modules to versions 5.4 and 5.5 --- 5.4/Dockerfile | 5 ++++- 5.5/Dockerfile | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 0c10b1b2424b9..ad79e17bccca0 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -25,10 +25,13 @@ RUN set -x \ && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-curl \ + --with-gd \ + --with-gzip \ --with-mysql \ --with-mysqli \ - --with-pdo-mysql \ --with-openssl \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 2153567c6abb1..5f76d1ca45f7b 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -25,10 +25,13 @@ RUN set -x \ && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-curl \ + --with-gd \ + --with-gzip \ --with-mysql \ --with-mysqli \ - --with-pdo-mysql \ --with-openssl \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 7cd19dc2a719c3fd9744067df8f07fd74a7b113b Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Mon, 27 Oct 2014 16:16:05 -0600 Subject: [PATCH 35/60] Update apache versions --- 5.4/apache/Dockerfile | 5 ++++- 5.5/apache/Dockerfile | 5 ++++- 5.6/apache/Dockerfile | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index c80eab4f5c1a0..5d4deb8b73889 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -34,10 +34,13 @@ RUN set -x \ && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-curl \ + --with-gd \ + --with-gzip \ --with-mysql \ --with-mysqli \ - --with-pdo-mysql \ --with-openssl \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 39bcc5f906356..cf8addff59bc2 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -34,10 +34,13 @@ RUN set -x \ && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-curl \ + --with-gd \ + --with-gzip \ --with-mysql \ --with-mysqli \ - --with-pdo-mysql \ --with-openssl \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 6e0dcdbddb0c3..6492181045e24 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -34,10 +34,13 @@ RUN set -x \ && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + --with-curl \ + --with-gd \ + --with-gzip \ --with-mysql \ --with-mysqli \ - --with-pdo-mysql \ --with-openssl \ + --with-pdo-mysql \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From 87828ff10b17018b0250b698e903e2bb2ffe50ce Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Mon, 3 Nov 2014 10:07:14 -0800 Subject: [PATCH 36/60] Gzip does not exist as a flag, use zlib --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index ad79e17bccca0..c1424b641e8d3 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -27,11 +27,11 @@ RUN set -x \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ --with-gd \ - --with-gzip \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-zlib \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 5d4deb8b73889..f0d9d7cdeab9c 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -36,11 +36,11 @@ RUN set -x \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ --with-gd \ - --with-gzip \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-zlib \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 5f76d1ca45f7b..01ace364d1898 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -27,11 +27,11 @@ RUN set -x \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ --with-gd \ - --with-gzip \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-zlib \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index cf8addff59bc2..02b96b4e1c421 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -36,11 +36,11 @@ RUN set -x \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ --with-gd \ - --with-gzip \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-zlib \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index f585b0958b3c3..d634127ea96cb 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -27,11 +27,11 @@ RUN set -x \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ --with-gd \ - --with-gzip \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-zlib \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 6492181045e24..dab36400a4dba 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -36,11 +36,11 @@ RUN set -x \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ --with-gd \ - --with-gzip \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-zlib \ && make -j"$(nproc)" \ && make install \ && dpkg -r bison libbison-dev \ From a3dcd781795a1d0d033e44b2552677526ff969b8 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 3 Nov 2014 17:02:20 -0700 Subject: [PATCH 37/60] Remove buildconf from our Dockerfiles since we use the release tarballs, which have pre-generated configure scripts --- 5.4/Dockerfile | 1 - 5.4/apache/Dockerfile | 1 - 5.5/Dockerfile | 1 - 5.5/apache/Dockerfile | 1 - 5.6/Dockerfile | 1 - 5.6/apache/Dockerfile | 1 - 6 files changed, 6 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index ad79e17bccca0..a7a37a5406ea3 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -22,7 +22,6 @@ RUN set -x \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 5d4deb8b73889..2249483bdc73e 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -31,7 +31,6 @@ RUN set -x \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 5f76d1ca45f7b..76aaa71c52fd8 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -22,7 +22,6 @@ RUN set -x \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index cf8addff59bc2..9b3a030dcde31 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -31,7 +31,6 @@ RUN set -x \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index f585b0958b3c3..5bdc792bb9cf4 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -22,7 +22,6 @@ RUN set -x \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 6492181045e24..b005b13c3a206 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -31,7 +31,6 @@ RUN set -x \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./buildconf --force \ && ./configure --disable-cgi \ $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ --with-curl \ From a6e6a6381d501abaf3d5cf47e05b3ea760804a84 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 6 Nov 2014 17:34:27 -0700 Subject: [PATCH 38/60] Refactor Dockerfile, switching the base from `buildpack-deps` over to `debian` directly This results in a dramatic reduction of image size: ```console $ docker images php REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE php 5.4 6b03f428509e 3 hours ago 354.3 MB php 5.4-apache 2bd126f2c469 2 minutes ago 394.8 MB php 5.5 19a5113df69a 9 minutes ago 356.4 MB php 5.5-apache 6c892721307f 2 minutes ago 396.9 MB php 5.6 69aead156fe7 10 minutes ago 356.8 MB php 5.6-apache 2d0bae628aaf About an hour ago 397.3 MB ``` vs the old: ```console $ docker images php REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE php 5.4 e760b9bd2c6c 2 days ago 736.9 MB php 5.4-apache 62c23e8f1704 2 days ago 811.8 MB php 5.5 156d2a323bc0 2 days ago 739.8 MB php 5.5-apache 3014d0f81b29 2 days ago 814.7 MB php 5.6 dab86418397c 2 days ago 740.2 MB php 5.6-apache b3c4a0633954 2 days ago 815.1 MB ``` --- 5.4/Dockerfile | 38 ++++++++++++++++++++++----------- 5.4/apache/Dockerfile | 44 +++++++++++++++++++++++++++------------ 5.5/Dockerfile | 38 ++++++++++++++++++++++----------- 5.5/apache/Dockerfile | 44 +++++++++++++++++++++++++++------------ 5.6/Dockerfile | 38 ++++++++++++++++++++++----------- 5.6/apache/Dockerfile | 44 +++++++++++++++++++++++++++------------ apache-Dockerfile-block-1 | 13 ++++++++++++ apache-Dockerfile-block-2 | 4 ++++ update.sh | 28 +++++++++---------------- 9 files changed, 198 insertions(+), 93 deletions(-) create mode 100644 apache-Dockerfile-block-1 create mode 100644 apache-Dockerfile-block-2 diff --git a/5.4/Dockerfile b/5.4/Dockerfile index eba8265b03a90..a3b893b740835 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -1,20 +1,30 @@ -FROM buildpack-deps:jessie +FROM debian:jessie -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* +# persistent / runtime deps +RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* -#### -#### +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.34 -RUN set -x \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + build-essential \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libpng12-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + m4 \ + pkg-config \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ @@ -23,17 +33,21 @@ RUN set -x \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + $PHP_EXTRA_CONFIGURE_ARGS \ --with-curl \ --with-gd \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ - && dpkg -r bison libbison-dev \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -r /usr/src/php +#### CMD ["php", "-a"] +#### diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 14330d6e305d5..4c50e6a877301 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -1,9 +1,10 @@ -FROM buildpack-deps:jessie +FROM debian:jessie -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* +# persistent / runtime deps +RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* -#### -RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* +#### +RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html @@ -12,18 +13,31 @@ RUN a2dismod mpm_event && a2enmod mpm_prefork RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist COPY apache2.conf /etc/apache2/apache2.conf -#### +# it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation + +ENV PHP_EXTRA_BUILD_DEPS apache2-dev +ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 +#### RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.34 -RUN set -x \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + build-essential \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libpng12-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + m4 \ + pkg-config \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ @@ -32,20 +46,24 @@ RUN set -x \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + $PHP_EXTRA_CONFIGURE_ARGS \ --with-curl \ --with-gd \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ - && dpkg -r bison libbison-dev \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -r /usr/src/php +#### WORKDIR /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] +#### diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 441c3687e1194..46374d36563b2 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -1,20 +1,30 @@ -FROM buildpack-deps:jessie +FROM debian:jessie -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* +# persistent / runtime deps +RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* -#### -#### +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.18 -RUN set -x \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + build-essential \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libpng12-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + m4 \ + pkg-config \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ @@ -23,17 +33,21 @@ RUN set -x \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + $PHP_EXTRA_CONFIGURE_ARGS \ --with-curl \ --with-gd \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ - && dpkg -r bison libbison-dev \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -r /usr/src/php +#### CMD ["php", "-a"] +#### diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index f394c5052437b..9246e88546642 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -1,9 +1,10 @@ -FROM buildpack-deps:jessie +FROM debian:jessie -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* +# persistent / runtime deps +RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* -#### -RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* +#### +RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html @@ -12,18 +13,31 @@ RUN a2dismod mpm_event && a2enmod mpm_prefork RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist COPY apache2.conf /etc/apache2/apache2.conf -#### +# it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation + +ENV PHP_EXTRA_BUILD_DEPS apache2-dev +ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.18 -RUN set -x \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + build-essential \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libpng12-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + m4 \ + pkg-config \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ @@ -32,20 +46,24 @@ RUN set -x \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + $PHP_EXTRA_CONFIGURE_ARGS \ --with-curl \ --with-gd \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ - && dpkg -r bison libbison-dev \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -r /usr/src/php +#### WORKDIR /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] +#### diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 243702700499e..56fbfd00c55c6 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -1,20 +1,30 @@ -FROM buildpack-deps:jessie +FROM debian:jessie -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* +# persistent / runtime deps +RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* -#### -#### +#### +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.2 -RUN set -x \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + build-essential \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libpng12-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + m4 \ + pkg-config \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ @@ -23,17 +33,21 @@ RUN set -x \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + $PHP_EXTRA_CONFIGURE_ARGS \ --with-curl \ --with-gd \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ - && dpkg -r bison libbison-dev \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -r /usr/src/php +#### CMD ["php", "-a"] +#### diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 64aef64cf2f82..bd5beb814c9d9 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -1,9 +1,10 @@ -FROM buildpack-deps:jessie +FROM debian:jessie -RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* +# persistent / runtime deps +RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* -#### -RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* +#### +RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html @@ -12,18 +13,31 @@ RUN a2dismod mpm_event && a2enmod mpm_prefork RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist COPY apache2.conf /etc/apache2/apache2.conf -#### +# it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation + +ENV PHP_EXTRA_BUILD_DEPS apache2-dev +ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 +#### RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.2 -RUN set -x \ - && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ - && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ - && rm *.deb \ +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + build-essential \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libpng12-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + m4 \ + pkg-config \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ && gpg --verify php.tar.bz2.asc \ @@ -32,20 +46,24 @@ RUN set -x \ && rm php.tar.bz2* \ && cd /usr/src/php \ && ./configure --disable-cgi \ - $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ + $PHP_EXTRA_CONFIGURE_ARGS \ --with-curl \ --with-gd \ --with-mysql \ --with-mysqli \ --with-openssl \ --with-pdo-mysql \ + --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ - && dpkg -r bison libbison-dev \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ && rm -r /usr/src/php +#### WORKDIR /var/www/html EXPOSE 80 CMD ["apache2", "-DFOREGROUND"] +#### diff --git a/apache-Dockerfile-block-1 b/apache-Dockerfile-block-1 new file mode 100644 index 0000000000000..ed8264c1484a3 --- /dev/null +++ b/apache-Dockerfile-block-1 @@ -0,0 +1,13 @@ +RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* + +RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html + +# Apache + PHP requires preforking Apache for best results +RUN a2dismod mpm_event && a2enmod mpm_prefork + +RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist +COPY apache2.conf /etc/apache2/apache2.conf +# it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation + +ENV PHP_EXTRA_BUILD_DEPS apache2-dev +ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 diff --git a/apache-Dockerfile-block-2 b/apache-Dockerfile-block-2 new file mode 100644 index 0000000000000..0dd7f61e0921c --- /dev/null +++ b/apache-Dockerfile-block-2 @@ -0,0 +1,4 @@ +WORKDIR /var/www/html + +EXPOSE 80 +CMD ["apache2", "-DFOREGROUND"] diff --git a/update.sh b/update.sh index 789f369d1f689..5c7b2545c9253 100755 --- a/update.sh +++ b/update.sh @@ -31,24 +31,16 @@ for version in "${versions[@]}"; do exit 1 fi - awk '$1 != "CMD" { print } $1 == "####" && c == 0 { c = 1; system("cat") }' "$version/Dockerfile" > "$version/apache/Dockerfile" <<-'EOD' - RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* - - RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html - - # Apache + PHP requires preforking Apache for best results - RUN a2dismod mpm_event && a2enmod mpm_prefork - - RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist - COPY apache2.conf /etc/apache2/apache2.conf - EOD - - cat >> "$version/apache/Dockerfile" <<-'EOD' - WORKDIR /var/www/html - - EXPOSE 80 - CMD ["apache2", "-DFOREGROUND"] - EOD + for variant in apache; do + echo "Generating $version/$variant/Dockerfile from $variant-Dockerfile-block-*" + awk ' + $1 == "####" { ia = 0 } + !ia { print } + $1 == "####" { ia = 1; ab++; ac = 0 } + ia { ac++ } + ia && ac == 1 { system("cat '$variant'-Dockerfile-block-" ab) } + ' "$version/Dockerfile" > "$version/$variant/Dockerfile" + done ( set -x From cf2a4bcb5b7044f3db73eef4aa8d8e56e07cdf61 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 6 Nov 2014 20:02:36 -0700 Subject: [PATCH 39/60] Add ca-certificates (which was in buildpack-deps) --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index a3b893b740835..00e379975a17d 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -1,7 +1,7 @@ FROM debian:jessie # persistent / runtime deps -RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* #### #### diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 4c50e6a877301..0496fa39f32be 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -1,7 +1,7 @@ FROM debian:jessie # persistent / runtime deps -RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* #### RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 46374d36563b2..1606da773098d 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -1,7 +1,7 @@ FROM debian:jessie # persistent / runtime deps -RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* #### #### diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 9246e88546642..bf0dae7fb1db5 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -1,7 +1,7 @@ FROM debian:jessie # persistent / runtime deps -RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* #### RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 56fbfd00c55c6..5476f582bab6c 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -1,7 +1,7 @@ FROM debian:jessie # persistent / runtime deps -RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* #### #### diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index bd5beb814c9d9..17c640640c03e 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -1,7 +1,7 @@ FROM debian:jessie # persistent / runtime deps -RUN apt-get update && apt-get install -y curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* #### RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* From 98f6553f688b7071ebeb8331add734d569bd4141 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Thu, 6 Nov 2014 11:24:59 -0800 Subject: [PATCH 40/60] Add --enable-soap --- 5.4/Dockerfile | 1 + 5.4/apache/Dockerfile | 1 + 5.5/Dockerfile | 1 + 5.5/apache/Dockerfile | 1 + 5.6/Dockerfile | 1 + 5.6/apache/Dockerfile | 1 + 6 files changed, 6 insertions(+) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 00e379975a17d..65c3b6aa6fb8b 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -34,6 +34,7 @@ RUN buildDeps=" \ && cd /usr/src/php \ && ./configure --disable-cgi \ $PHP_EXTRA_CONFIGURE_ARGS \ + --enable-soap \ --with-curl \ --with-gd \ --with-mysql \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 0496fa39f32be..44c22990e9e05 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -47,6 +47,7 @@ RUN buildDeps=" \ && cd /usr/src/php \ && ./configure --disable-cgi \ $PHP_EXTRA_CONFIGURE_ARGS \ + --enable-soap \ --with-curl \ --with-gd \ --with-mysql \ diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 1606da773098d..eb54eb27f77c3 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -34,6 +34,7 @@ RUN buildDeps=" \ && cd /usr/src/php \ && ./configure --disable-cgi \ $PHP_EXTRA_CONFIGURE_ARGS \ + --enable-soap \ --with-curl \ --with-gd \ --with-mysql \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index bf0dae7fb1db5..32d70fc10110d 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -47,6 +47,7 @@ RUN buildDeps=" \ && cd /usr/src/php \ && ./configure --disable-cgi \ $PHP_EXTRA_CONFIGURE_ARGS \ + --enable-soap \ --with-curl \ --with-gd \ --with-mysql \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 5476f582bab6c..afbd82c98a707 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -34,6 +34,7 @@ RUN buildDeps=" \ && cd /usr/src/php \ && ./configure --disable-cgi \ $PHP_EXTRA_CONFIGURE_ARGS \ + --enable-soap \ --with-curl \ --with-gd \ --with-mysql \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 17c640640c03e..527bcf18562c0 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -47,6 +47,7 @@ RUN buildDeps=" \ && cd /usr/src/php \ && ./configure --disable-cgi \ $PHP_EXTRA_CONFIGURE_ARGS \ + --enable-soap \ --with-curl \ --with-gd \ --with-mysql \ From 4d09bc45cb4849edfb4e22aac5b47ddef97b79c7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 10 Nov 2014 13:13:21 -0700 Subject: [PATCH 41/60] Keep the source and instead just "make clean" --- 5.4/Dockerfile | 21 +++++++++++---------- 5.4/apache/Dockerfile | 21 +++++++++++---------- 5.5/Dockerfile | 21 +++++++++++---------- 5.5/apache/Dockerfile | 21 +++++++++++---------- 5.6/Dockerfile | 21 +++++++++++---------- 5.6/apache/Dockerfile | 21 +++++++++++---------- 6 files changed, 66 insertions(+), 60 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 65c3b6aa6fb8b..285ac913f57e3 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -3,6 +3,12 @@ FROM debian:jessie # persistent / runtime deps RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +# phpize deps +RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + #### #### @@ -16,12 +22,9 @@ RUN buildDeps=" \ bzip2 \ file \ libcurl4-openssl-dev \ - libpng12-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ - m4 \ - pkg-config \ "; \ set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ @@ -32,22 +35,20 @@ RUN buildDeps=" \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./configure --disable-cgi \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ - --enable-soap \ + --disable-cgi \ --with-curl \ - --with-gd \ - --with-mysql \ - --with-mysqli \ --with-openssl \ - --with-pdo-mysql \ --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ && apt-get purge -y --auto-remove $buildDeps \ - && rm -r /usr/src/php + && make clean #### CMD ["php", "-a"] diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 44c22990e9e05..12152ecc6ca18 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -3,6 +3,12 @@ FROM debian:jessie # persistent / runtime deps RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +# phpize deps +RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + #### RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* @@ -29,12 +35,9 @@ RUN buildDeps=" \ bzip2 \ file \ libcurl4-openssl-dev \ - libpng12-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ - m4 \ - pkg-config \ "; \ set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ @@ -45,22 +48,20 @@ RUN buildDeps=" \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./configure --disable-cgi \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ - --enable-soap \ + --disable-cgi \ --with-curl \ - --with-gd \ - --with-mysql \ - --with-mysqli \ --with-openssl \ - --with-pdo-mysql \ --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ && apt-get purge -y --auto-remove $buildDeps \ - && rm -r /usr/src/php + && make clean #### WORKDIR /var/www/html diff --git a/5.5/Dockerfile b/5.5/Dockerfile index eb54eb27f77c3..c0e18d847beef 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -3,6 +3,12 @@ FROM debian:jessie # persistent / runtime deps RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +# phpize deps +RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + #### #### @@ -16,12 +22,9 @@ RUN buildDeps=" \ bzip2 \ file \ libcurl4-openssl-dev \ - libpng12-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ - m4 \ - pkg-config \ "; \ set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ @@ -32,22 +35,20 @@ RUN buildDeps=" \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./configure --disable-cgi \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ - --enable-soap \ + --disable-cgi \ --with-curl \ - --with-gd \ - --with-mysql \ - --with-mysqli \ --with-openssl \ - --with-pdo-mysql \ --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ && apt-get purge -y --auto-remove $buildDeps \ - && rm -r /usr/src/php + && make clean #### CMD ["php", "-a"] diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 32d70fc10110d..52a10bdfe9a42 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -3,6 +3,12 @@ FROM debian:jessie # persistent / runtime deps RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +# phpize deps +RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + #### RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* @@ -29,12 +35,9 @@ RUN buildDeps=" \ bzip2 \ file \ libcurl4-openssl-dev \ - libpng12-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ - m4 \ - pkg-config \ "; \ set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ @@ -45,22 +48,20 @@ RUN buildDeps=" \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./configure --disable-cgi \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ - --enable-soap \ + --disable-cgi \ --with-curl \ - --with-gd \ - --with-mysql \ - --with-mysqli \ --with-openssl \ - --with-pdo-mysql \ --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ && apt-get purge -y --auto-remove $buildDeps \ - && rm -r /usr/src/php + && make clean #### WORKDIR /var/www/html diff --git a/5.6/Dockerfile b/5.6/Dockerfile index afbd82c98a707..c049730192a40 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -3,6 +3,12 @@ FROM debian:jessie # persistent / runtime deps RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +# phpize deps +RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + #### #### @@ -16,12 +22,9 @@ RUN buildDeps=" \ bzip2 \ file \ libcurl4-openssl-dev \ - libpng12-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ - m4 \ - pkg-config \ "; \ set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ @@ -32,22 +35,20 @@ RUN buildDeps=" \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./configure --disable-cgi \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ - --enable-soap \ + --disable-cgi \ --with-curl \ - --with-gd \ - --with-mysql \ - --with-mysqli \ --with-openssl \ - --with-pdo-mysql \ --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ && apt-get purge -y --auto-remove $buildDeps \ - && rm -r /usr/src/php + && make clean #### CMD ["php", "-a"] diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 527bcf18562c0..47d47a8c623fe 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -3,6 +3,12 @@ FROM debian:jessie # persistent / runtime deps RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* +# phpize deps +RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + #### RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* @@ -29,12 +35,9 @@ RUN buildDeps=" \ bzip2 \ file \ libcurl4-openssl-dev \ - libpng12-dev \ libreadline6-dev \ libssl-dev \ libxml2-dev \ - m4 \ - pkg-config \ "; \ set -x \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ @@ -45,22 +48,20 @@ RUN buildDeps=" \ && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ && rm php.tar.bz2* \ && cd /usr/src/php \ - && ./configure --disable-cgi \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ - --enable-soap \ + --disable-cgi \ --with-curl \ - --with-gd \ - --with-mysql \ - --with-mysqli \ --with-openssl \ - --with-pdo-mysql \ --with-readline \ --with-zlib \ && make -j"$(nproc)" \ && make install \ && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ && apt-get purge -y --auto-remove $buildDeps \ - && rm -r /usr/src/php + && make clean #### WORKDIR /var/www/html From 2c5880107a84631b60439625b6b19c412de196ba Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 11 Nov 2014 13:17:28 -0700 Subject: [PATCH 42/60] Add new `docker-php-ext-*` scripts for magic For example, the following makes WordPress work: ```Dockerfile RUN apt-get update && apt-get install -y libpng12-dev && rm -rf /var/lib/apt/lists/* \ && docker-php-ext-install gd \ && apt-get purge --auto-remove -y libpng12-dev RUN docker-php-ext-install mysqli ``` --- 5.4/Dockerfile | 7 ++-- 5.4/apache/Dockerfile | 7 ++-- 5.4/apache/docker-php-ext-configure | 19 ++++++++++ 5.4/apache/docker-php-ext-install | 55 +++++++++++++++++++++++++++++ 5.4/docker-php-ext-configure | 19 ++++++++++ 5.4/docker-php-ext-install | 55 +++++++++++++++++++++++++++++ 5.5/Dockerfile | 7 ++-- 5.5/apache/Dockerfile | 7 ++-- 5.5/apache/docker-php-ext-configure | 19 ++++++++++ 5.5/apache/docker-php-ext-install | 55 +++++++++++++++++++++++++++++ 5.5/docker-php-ext-configure | 19 ++++++++++ 5.5/docker-php-ext-install | 55 +++++++++++++++++++++++++++++ 5.6/Dockerfile | 7 ++-- 5.6/apache/Dockerfile | 7 ++-- 5.6/apache/docker-php-ext-configure | 19 ++++++++++ 5.6/apache/docker-php-ext-install | 55 +++++++++++++++++++++++++++++ 5.6/docker-php-ext-configure | 19 ++++++++++ 5.6/docker-php-ext-install | 55 +++++++++++++++++++++++++++++ docker-php-ext-configure | 19 ++++++++++ docker-php-ext-install | 55 +++++++++++++++++++++++++++++ update.sh | 2 ++ 21 files changed, 550 insertions(+), 12 deletions(-) create mode 100755 5.4/apache/docker-php-ext-configure create mode 100755 5.4/apache/docker-php-ext-install create mode 100755 5.4/docker-php-ext-configure create mode 100755 5.4/docker-php-ext-install create mode 100755 5.5/apache/docker-php-ext-configure create mode 100755 5.5/apache/docker-php-ext-install create mode 100755 5.5/docker-php-ext-configure create mode 100755 5.5/docker-php-ext-install create mode 100755 5.6/apache/docker-php-ext-configure create mode 100755 5.6/apache/docker-php-ext-install create mode 100755 5.6/docker-php-ext-configure create mode 100755 5.6/docker-php-ext-install create mode 100755 docker-php-ext-configure create mode 100755 docker-php-ext-install diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 285ac913f57e3..1625e3f3cf14f 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d @@ -16,9 +16,9 @@ RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA0 ENV PHP_VERSION 5.4.34 +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - build-essential \ bzip2 \ file \ libcurl4-openssl-dev \ @@ -40,6 +40,7 @@ RUN buildDeps=" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ --disable-cgi \ + --enable-mysqlnd \ --with-curl \ --with-openssl \ --with-readline \ @@ -50,6 +51,8 @@ RUN buildDeps=" \ && apt-get purge -y --auto-remove $buildDeps \ && make clean +COPY docker-php-ext-* /usr/local/bin/ + #### CMD ["php", "-a"] #### diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 12152ecc6ca18..3b88c227fe9d0 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d @@ -29,9 +29,9 @@ RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA0 ENV PHP_VERSION 5.4.34 +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - build-essential \ bzip2 \ file \ libcurl4-openssl-dev \ @@ -53,6 +53,7 @@ RUN buildDeps=" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ --disable-cgi \ + --enable-mysqlnd \ --with-curl \ --with-openssl \ --with-readline \ @@ -63,6 +64,8 @@ RUN buildDeps=" \ && apt-get purge -y --auto-remove $buildDeps \ && make clean +COPY docker-php-ext-* /usr/local/bin/ + #### WORKDIR /var/www/html diff --git a/5.4/apache/docker-php-ext-configure b/5.4/apache/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.4/apache/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.4/apache/docker-php-ext-install b/5.4/apache/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.4/apache/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.4/docker-php-ext-configure b/5.4/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.4/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.4/docker-php-ext-install b/5.4/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.4/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.5/Dockerfile b/5.5/Dockerfile index c0e18d847beef..43888454e680c 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d @@ -16,9 +16,9 @@ RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D9 ENV PHP_VERSION 5.5.18 +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - build-essential \ bzip2 \ file \ libcurl4-openssl-dev \ @@ -40,6 +40,7 @@ RUN buildDeps=" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ --disable-cgi \ + --enable-mysqlnd \ --with-curl \ --with-openssl \ --with-readline \ @@ -50,6 +51,8 @@ RUN buildDeps=" \ && apt-get purge -y --auto-remove $buildDeps \ && make clean +COPY docker-php-ext-* /usr/local/bin/ + #### CMD ["php", "-a"] #### diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 52a10bdfe9a42..1aa4e8f400f87 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d @@ -29,9 +29,9 @@ RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D9 ENV PHP_VERSION 5.5.18 +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - build-essential \ bzip2 \ file \ libcurl4-openssl-dev \ @@ -53,6 +53,7 @@ RUN buildDeps=" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ --disable-cgi \ + --enable-mysqlnd \ --with-curl \ --with-openssl \ --with-readline \ @@ -63,6 +64,8 @@ RUN buildDeps=" \ && apt-get purge -y --auto-remove $buildDeps \ && make clean +COPY docker-php-ext-* /usr/local/bin/ + #### WORKDIR /var/www/html diff --git a/5.5/apache/docker-php-ext-configure b/5.5/apache/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.5/apache/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.5/apache/docker-php-ext-install b/5.5/apache/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.5/apache/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.5/docker-php-ext-configure b/5.5/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.5/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.5/docker-php-ext-install b/5.5/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.5/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.6/Dockerfile b/5.6/Dockerfile index c049730192a40..7a660e266475d 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d @@ -16,9 +16,9 @@ RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CF ENV PHP_VERSION 5.6.2 +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - build-essential \ bzip2 \ file \ libcurl4-openssl-dev \ @@ -40,6 +40,7 @@ RUN buildDeps=" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ --disable-cgi \ + --enable-mysqlnd \ --with-curl \ --with-openssl \ --with-readline \ @@ -50,6 +51,8 @@ RUN buildDeps=" \ && apt-get purge -y --auto-remove $buildDeps \ && make clean +COPY docker-php-ext-* /usr/local/bin/ + #### CMD ["php", "-a"] #### diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 47d47a8c623fe..8a21997e5d8a6 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d @@ -29,9 +29,9 @@ RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CF ENV PHP_VERSION 5.6.2 +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ $PHP_EXTRA_BUILD_DEPS \ - build-essential \ bzip2 \ file \ libcurl4-openssl-dev \ @@ -53,6 +53,7 @@ RUN buildDeps=" \ --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ $PHP_EXTRA_CONFIGURE_ARGS \ --disable-cgi \ + --enable-mysqlnd \ --with-curl \ --with-openssl \ --with-readline \ @@ -63,6 +64,8 @@ RUN buildDeps=" \ && apt-get purge -y --auto-remove $buildDeps \ && make clean +COPY docker-php-ext-* /usr/local/bin/ + #### WORKDIR /var/www/html diff --git a/5.6/apache/docker-php-ext-configure b/5.6/apache/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.6/apache/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.6/apache/docker-php-ext-install b/5.6/apache/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.6/apache/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.6/docker-php-ext-configure b/5.6/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.6/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.6/docker-php-ext-install b/5.6/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.6/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/docker-php-ext-configure b/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/docker-php-ext-install b/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/update.sh b/update.sh index 5c7b2545c9253..b5e29c78c3c22 100755 --- a/update.sh +++ b/update.sh @@ -49,6 +49,8 @@ for version in "${versions[@]}"; do s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ ' "$version/Dockerfile" + cp docker-php-ext-* "$version/" + cp docker-php-ext-* "$version/apache/" cp apache2.conf "$version/apache/" ) done From c06a6485d6a3025c89d233c2c2066c8c7582d32e Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 11 Nov 2014 12:20:25 -0800 Subject: [PATCH 43/60] Make the root more obvious, fix DirectoryIndex to php first --- 5.4/apache/apache2.conf | 9 +++++++-- 5.5/apache/apache2.conf | 9 +++++++-- 5.6/apache/apache2.conf | 9 +++++++-- apache2.conf | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/5.4/apache/apache2.conf b/5.4/apache/apache2.conf index 85ef37884d30a..09f4a920b8e10 100644 --- a/5.4/apache/apache2.conf +++ b/5.4/apache/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html diff --git a/5.5/apache/apache2.conf b/5.5/apache/apache2.conf index 85ef37884d30a..09f4a920b8e10 100644 --- a/5.5/apache/apache2.conf +++ b/5.5/apache/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html diff --git a/5.6/apache/apache2.conf b/5.6/apache/apache2.conf index 85ef37884d30a..09f4a920b8e10 100644 --- a/5.6/apache/apache2.conf +++ b/5.6/apache/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html diff --git a/apache2.conf b/apache2.conf index 85ef37884d30a..09f4a920b8e10 100644 --- a/apache2.conf +++ b/apache2.conf @@ -36,6 +36,8 @@ Listen 80 Require all granted +DocumentRoot /var/www/html + AccessFileName .htaccess Require all denied @@ -52,6 +54,9 @@ CustomLog /proc/self/fd/1 combined SetHandler application/x-httpd-php -DirectoryIndex index.php -DocumentRoot /var/www/html +# Multiple DirectoryIndex directives within the same context will add +# to the list of resources to look for rather than replace +# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex +DirectoryIndex disabled +DirectoryIndex index.php index.html From b2e1b8e2a37db419ae1244b9f63456b86f666ffe Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 12 Nov 2014 09:54:38 -0700 Subject: [PATCH 44/60] Add back make (which we somehow missed) --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 1625e3f3cf14f..0babd4db250ae 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 3b88c227fe9d0..c33b101017dd3 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 43888454e680c..715a7e5be13b7 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 1aa4e8f400f87..07262d9e37d03 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 7a660e266475d..8b8ad298a6e28 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 8a21997e5d8a6..1e44ac6700b41 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -4,7 +4,7 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* # phpize deps -RUN apt-get update && apt-get install -y autoconf gcc pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* ENV PHP_INI_DIR /usr/local/etc/php RUN mkdir -p $PHP_INI_DIR/conf.d From 80f855114cb4c44eef7aa2a0e22a07e40e97cc03 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 6 Nov 2014 17:41:50 -0700 Subject: [PATCH 45/60] Add FPM variant --- 5.4/fpm/Dockerfile | 63 ++++++++++++++++++++++++++++++++ 5.4/fpm/docker-php-ext-configure | 19 ++++++++++ 5.4/fpm/docker-php-ext-install | 55 ++++++++++++++++++++++++++++ 5.4/fpm/php-fpm.conf | 23 ++++++++++++ 5.5/fpm/Dockerfile | 63 ++++++++++++++++++++++++++++++++ 5.5/fpm/docker-php-ext-configure | 19 ++++++++++ 5.5/fpm/docker-php-ext-install | 55 ++++++++++++++++++++++++++++ 5.5/fpm/php-fpm.conf | 23 ++++++++++++ 5.6/fpm/Dockerfile | 63 ++++++++++++++++++++++++++++++++ 5.6/fpm/docker-php-ext-configure | 19 ++++++++++ 5.6/fpm/docker-php-ext-install | 55 ++++++++++++++++++++++++++++ 5.6/fpm/php-fpm.conf | 23 ++++++++++++ fpm-Dockerfile-block-1 | 1 + fpm-Dockerfile-block-2 | 5 +++ generate-stackbrew-library.sh | 6 +-- php-fpm.conf | 23 ++++++++++++ update.sh | 8 ++-- 17 files changed, 517 insertions(+), 6 deletions(-) create mode 100644 5.4/fpm/Dockerfile create mode 100755 5.4/fpm/docker-php-ext-configure create mode 100755 5.4/fpm/docker-php-ext-install create mode 100644 5.4/fpm/php-fpm.conf create mode 100644 5.5/fpm/Dockerfile create mode 100755 5.5/fpm/docker-php-ext-configure create mode 100755 5.5/fpm/docker-php-ext-install create mode 100644 5.5/fpm/php-fpm.conf create mode 100644 5.6/fpm/Dockerfile create mode 100755 5.6/fpm/docker-php-ext-configure create mode 100755 5.6/fpm/docker-php-ext-install create mode 100644 5.6/fpm/php-fpm.conf create mode 100644 fpm-Dockerfile-block-1 create mode 100644 fpm-Dockerfile-block-2 create mode 100644 php-fpm.conf diff --git a/5.4/fpm/Dockerfile b/5.4/fpm/Dockerfile new file mode 100644 index 0000000000000..ce8461eee79d1 --- /dev/null +++ b/5.4/fpm/Dockerfile @@ -0,0 +1,63 @@ +FROM debian:jessie + +# persistent / runtime deps +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* + +# phpize deps +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + +#### +ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data +#### + +RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D + +ENV PHP_VERSION 5.4.34 + +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ + $PHP_EXTRA_CONFIGURE_ARGS \ + --disable-cgi \ + --enable-mysqlnd \ + --with-curl \ + --with-openssl \ + --with-readline \ + --with-zlib \ + && make -j"$(nproc)" \ + && make install \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ + && make clean + +COPY docker-php-ext-* /usr/local/bin/ + +#### +WORKDIR /var/www/html +COPY php-fpm.conf /usr/local/etc/ + +EXPOSE 9000 +CMD ["php-fpm"] +#### diff --git a/5.4/fpm/docker-php-ext-configure b/5.4/fpm/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.4/fpm/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.4/fpm/docker-php-ext-install b/5.4/fpm/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.4/fpm/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.4/fpm/php-fpm.conf b/5.4/fpm/php-fpm.conf new file mode 100644 index 0000000000000..6a74b972063eb --- /dev/null +++ b/5.4/fpm/php-fpm.conf @@ -0,0 +1,23 @@ +; This file was initially adapated from the output of: (on PHP 5.6) +; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default + +[global] + +error_log = /proc/self/fd/2 +daemonize = no + +[www] + +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + +user = www-data +group = www-data + +listen = 9000 + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 diff --git a/5.5/fpm/Dockerfile b/5.5/fpm/Dockerfile new file mode 100644 index 0000000000000..9ac663277fede --- /dev/null +++ b/5.5/fpm/Dockerfile @@ -0,0 +1,63 @@ +FROM debian:jessie + +# persistent / runtime deps +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* + +# phpize deps +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + +#### +ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data +#### + +RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D + +ENV PHP_VERSION 5.5.18 + +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ + $PHP_EXTRA_CONFIGURE_ARGS \ + --disable-cgi \ + --enable-mysqlnd \ + --with-curl \ + --with-openssl \ + --with-readline \ + --with-zlib \ + && make -j"$(nproc)" \ + && make install \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ + && make clean + +COPY docker-php-ext-* /usr/local/bin/ + +#### +WORKDIR /var/www/html +COPY php-fpm.conf /usr/local/etc/ + +EXPOSE 9000 +CMD ["php-fpm"] +#### diff --git a/5.5/fpm/docker-php-ext-configure b/5.5/fpm/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.5/fpm/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.5/fpm/docker-php-ext-install b/5.5/fpm/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.5/fpm/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.5/fpm/php-fpm.conf b/5.5/fpm/php-fpm.conf new file mode 100644 index 0000000000000..6a74b972063eb --- /dev/null +++ b/5.5/fpm/php-fpm.conf @@ -0,0 +1,23 @@ +; This file was initially adapated from the output of: (on PHP 5.6) +; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default + +[global] + +error_log = /proc/self/fd/2 +daemonize = no + +[www] + +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + +user = www-data +group = www-data + +listen = 9000 + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile new file mode 100644 index 0000000000000..d5f9b628b8dc1 --- /dev/null +++ b/5.6/fpm/Dockerfile @@ -0,0 +1,63 @@ +FROM debian:jessie + +# persistent / runtime deps +RUN apt-get update && apt-get install -y ca-certificates curl libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* + +# phpize deps +RUN apt-get update && apt-get install -y autoconf gcc make pkg-config --no-install-recommends && rm -r /var/lib/apt/lists/* + +ENV PHP_INI_DIR /usr/local/etc/php +RUN mkdir -p $PHP_INI_DIR/conf.d + +#### +ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data +#### + +RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 + +ENV PHP_VERSION 5.6.2 + +# --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) +RUN buildDeps=" \ + $PHP_EXTRA_BUILD_DEPS \ + bzip2 \ + file \ + libcurl4-openssl-dev \ + libreadline6-dev \ + libssl-dev \ + libxml2-dev \ + "; \ + set -x \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ + && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ + && gpg --verify php.tar.bz2.asc \ + && mkdir -p /usr/src/php \ + && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ + && rm php.tar.bz2* \ + && cd /usr/src/php \ + && ./configure \ + --with-config-file-path="$PHP_INI_DIR" \ + --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ + $PHP_EXTRA_CONFIGURE_ARGS \ + --disable-cgi \ + --enable-mysqlnd \ + --with-curl \ + --with-openssl \ + --with-readline \ + --with-zlib \ + && make -j"$(nproc)" \ + && make install \ + && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ + && apt-get purge -y --auto-remove $buildDeps \ + && make clean + +COPY docker-php-ext-* /usr/local/bin/ + +#### +WORKDIR /var/www/html +COPY php-fpm.conf /usr/local/etc/ + +EXPOSE 9000 +CMD ["php-fpm"] +#### diff --git a/5.6/fpm/docker-php-ext-configure b/5.6/fpm/docker-php-ext-configure new file mode 100755 index 0000000000000..3d21b5bbca901 --- /dev/null +++ b/5.6/fpm/docker-php-ext-configure @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ext="$1" +extDir="/usr/src/php/ext/$ext" +if [ -z "$ext" -o ! -d "$extDir" ]; then + echo >&2 "usage: $0 ext-name [configure flags]" + echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" + echo >&2 + echo >&2 'Possible values for ext-name:' + echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) + exit 1 +fi +shift + +set -x +cd "$extDir" +phpize +./configure "$@" diff --git a/5.6/fpm/docker-php-ext-install b/5.6/fpm/docker-php-ext-install new file mode 100755 index 0000000000000..abca7fff26402 --- /dev/null +++ b/5.6/fpm/docker-php-ext-install @@ -0,0 +1,55 @@ +#!/bin/bash +set -e + +cd /usr/src/php/ext + +usage() { + echo "usage: $0 ext-name [ext-name ...]" + echo " ie: $0 gd mysqli" + echo " $0 pdo pdo_mysql" + echo + echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' + echo + echo 'Possible values for ext-name:' + echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) +} + +exts=() +while [ $# -gt 0 ]; do + ext="$1" + shift + if [ -z "$ext" ]; then + continue + fi + if [ ! -d "$ext" ]; then + echo >&2 "error: $(pwd -P)/$ext does not exist" + echo >&2 + usage >&2 + exit 1 + fi + exts+=( "$ext" ) +done + +if [ "${#exts[@]}" -eq 0 ]; then + usage >&2 + exit 1 +fi + +for ext in "${exts[@]}"; do + ( + cd "$ext" + [ -e Makefile ] || docker-php-ext-configure "$ext" + make + make install + ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" + for module in modules/*.so; do + if [ -f "$module" ]; then + line="extension=$(basename "$module")" + if ! grep -q "$line" "$ini"; then + echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" + fi + fi + done + make clean + ) +done diff --git a/5.6/fpm/php-fpm.conf b/5.6/fpm/php-fpm.conf new file mode 100644 index 0000000000000..6a74b972063eb --- /dev/null +++ b/5.6/fpm/php-fpm.conf @@ -0,0 +1,23 @@ +; This file was initially adapated from the output of: (on PHP 5.6) +; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default + +[global] + +error_log = /proc/self/fd/2 +daemonize = no + +[www] + +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + +user = www-data +group = www-data + +listen = 9000 + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 diff --git a/fpm-Dockerfile-block-1 b/fpm-Dockerfile-block-1 new file mode 100644 index 0000000000000..959fd928b9816 --- /dev/null +++ b/fpm-Dockerfile-block-1 @@ -0,0 +1 @@ +ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data diff --git a/fpm-Dockerfile-block-2 b/fpm-Dockerfile-block-2 new file mode 100644 index 0000000000000..e9989491b49ce --- /dev/null +++ b/fpm-Dockerfile-block-2 @@ -0,0 +1,5 @@ +WORKDIR /var/www/html +COPY php-fpm.conf /usr/local/etc/ + +EXPOSE 9000 +CMD ["php-fpm"] diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c555f49b39cb9..72153975325db 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -15,7 +15,7 @@ url='git://github.com/docker-library/php' echo '# maintainer: InfoSiftr (@infosiftr)' for version in "${versions[@]}"; do - commit="$(git log -1 --format='format:%H' "$version")" + commit="$(git log -1 --format='format:%H' -- "$version")" fullVersion="$(grep -m1 'ENV PHP_VERSION ' "$version/Dockerfile" | cut -d' ' -f3)" versionAliases=( $fullVersion $version ${aliases[$version]} ) @@ -32,8 +32,8 @@ for version in "${versions[@]}"; do echo "$va: ${url}@${commit} $version" done - for variant in apache; do - commit="$(git log -1 --format='format:%H' "$version/$variant")" + for variant in apache fpm; do + commit="$(git log -1 --format='format:%H' -- "$version/$variant")" echo for va in "${versionAliases[@]}"; do if [ "$va" = 'latest' ]; then diff --git a/php-fpm.conf b/php-fpm.conf new file mode 100644 index 0000000000000..6a74b972063eb --- /dev/null +++ b/php-fpm.conf @@ -0,0 +1,23 @@ +; This file was initially adapated from the output of: (on PHP 5.6) +; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default + +[global] + +error_log = /proc/self/fd/2 +daemonize = no + +[www] + +; if we send this to /proc/self/fd/1, it never appears +access.log = /proc/self/fd/2 + +user = www-data +group = www-data + +listen = 9000 + +pm = dynamic +pm.max_children = 5 +pm.start_servers = 2 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 diff --git a/update.sh b/update.sh index b5e29c78c3c22..63bb723114a98 100755 --- a/update.sh +++ b/update.sh @@ -31,7 +31,9 @@ for version in "${versions[@]}"; do exit 1 fi - for variant in apache; do + ( set -x; cp docker-php-ext-* "$version/" ) + + for variant in apache fpm; do echo "Generating $version/$variant/Dockerfile from $variant-Dockerfile-block-*" awk ' $1 == "####" { ia = 0 } @@ -40,6 +42,7 @@ for version in "${versions[@]}"; do ia { ac++ } ia && ac == 1 { system("cat '$variant'-Dockerfile-block-" ab) } ' "$version/Dockerfile" > "$version/$variant/Dockerfile" + ( set -x; cp docker-php-ext-* "$version/$variant/" ) done ( @@ -49,9 +52,8 @@ for version in "${versions[@]}"; do s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ ' "$version/Dockerfile" - cp docker-php-ext-* "$version/" - cp docker-php-ext-* "$version/apache/" cp apache2.conf "$version/apache/" + cp php-fpm.conf "$version/fpm/" ) done From 844ed7ce004749b2d81e98cfa2962043a1581fee Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 13 Nov 2014 17:34:23 -0700 Subject: [PATCH 46/60] Update to 5.5.19 and 5.6.3 for CVEs Fixes #45; thanks @thaJeztah --- 5.5/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 715a7e5be13b7..fa368734d2179 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.18 +ENV PHP_VERSION 5.5.19 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 8b8ad298a6e28..e500df9429073 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.2 +ENV PHP_VERSION 5.6.3 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From 18b5d0884c45f30d54bd0eca22352df7fc9fb0d8 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 14 Nov 2014 11:34:45 -0700 Subject: [PATCH 47/60] FAILURE (yeah, my bad) --- 5.4/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 0babd4db250ae..26900edac10b8 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.34 +ENV PHP_VERSION 5.4.35 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 07262d9e37d03..3e0c5a3940746 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.18 +ENV PHP_VERSION 5.5.19 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 1e44ac6700b41..7ac90e24046d9 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.2 +ENV PHP_VERSION 5.6.3 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From 583557dc05de007ee5701d0a92c400fd397c8970 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 14 Nov 2014 12:34:32 -0700 Subject: [PATCH 48/60] MOAAR --- 5.4/apache/Dockerfile | 2 +- 5.4/fpm/Dockerfile | 2 +- 5.5/fpm/Dockerfile | 2 +- 5.6/fpm/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index c33b101017dd3..094bad3912b96 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.34 +ENV PHP_VERSION 5.4.35 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.4/fpm/Dockerfile b/5.4/fpm/Dockerfile index ce8461eee79d1..78baa32a992d2 100644 --- a/5.4/fpm/Dockerfile +++ b/5.4/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.34 +ENV PHP_VERSION 5.4.35 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.5/fpm/Dockerfile b/5.5/fpm/Dockerfile index 9ac663277fede..b3b6bd1d02a3f 100644 --- a/5.5/fpm/Dockerfile +++ b/5.5/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.18 +ENV PHP_VERSION 5.5.19 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index d5f9b628b8dc1..22ac8016b27dc 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.2 +ENV PHP_VERSION 5.6.3 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From 5bcd974ac087165b250ef7da60f398a3937ebb81 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 14 Nov 2014 16:17:38 -0800 Subject: [PATCH 49/60] Add readme stub --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000000..aeb3d108fa291 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# About this Repo + +This is the Git repo of the official Docker image for [php](https://registry.hub.docker.com/_/php/). See the +Hub page for the full readme on how to use the Docker image and for information +regarding contributing and issues. + +The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), +specificially in [docker-library/docs/php](https://github.com/docker-library/docs/tree/master/php). From 9bb0b224807e03fff64574d0e76ed3e6e7d2ef26 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 19 Nov 2014 16:06:38 -0700 Subject: [PATCH 50/60] Fix php:fpm "listen" directive --- 5.4/fpm/php-fpm.conf | 2 +- 5.5/fpm/php-fpm.conf | 2 +- 5.6/fpm/php-fpm.conf | 2 +- php-fpm.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.4/fpm/php-fpm.conf b/5.4/fpm/php-fpm.conf index 6a74b972063eb..20c834fe116e4 100644 --- a/5.4/fpm/php-fpm.conf +++ b/5.4/fpm/php-fpm.conf @@ -14,7 +14,7 @@ access.log = /proc/self/fd/2 user = www-data group = www-data -listen = 9000 +listen = [::]:9000 pm = dynamic pm.max_children = 5 diff --git a/5.5/fpm/php-fpm.conf b/5.5/fpm/php-fpm.conf index 6a74b972063eb..20c834fe116e4 100644 --- a/5.5/fpm/php-fpm.conf +++ b/5.5/fpm/php-fpm.conf @@ -14,7 +14,7 @@ access.log = /proc/self/fd/2 user = www-data group = www-data -listen = 9000 +listen = [::]:9000 pm = dynamic pm.max_children = 5 diff --git a/5.6/fpm/php-fpm.conf b/5.6/fpm/php-fpm.conf index 6a74b972063eb..20c834fe116e4 100644 --- a/5.6/fpm/php-fpm.conf +++ b/5.6/fpm/php-fpm.conf @@ -14,7 +14,7 @@ access.log = /proc/self/fd/2 user = www-data group = www-data -listen = 9000 +listen = [::]:9000 pm = dynamic pm.max_children = 5 diff --git a/php-fpm.conf b/php-fpm.conf index 6a74b972063eb..20c834fe116e4 100644 --- a/php-fpm.conf +++ b/php-fpm.conf @@ -14,7 +14,7 @@ access.log = /proc/self/fd/2 user = www-data group = www-data -listen = 9000 +listen = [::]:9000 pm = dynamic pm.max_children = 5 From 58c3fd175cb3ab30633fbc3e86314154ecc38e89 Mon Sep 17 00:00:00 2001 From: Jared Markell Date: Wed, 19 Nov 2014 12:13:43 -0800 Subject: [PATCH 51/60] Load opcache as a zend_extension. --- 5.4/apache/docker-php-ext-install | 7 ++++++- 5.4/docker-php-ext-install | 7 ++++++- 5.4/fpm/docker-php-ext-install | 7 ++++++- 5.5/apache/docker-php-ext-install | 7 ++++++- 5.5/docker-php-ext-install | 7 ++++++- 5.5/fpm/docker-php-ext-install | 7 ++++++- 5.6/apache/docker-php-ext-install | 7 ++++++- 5.6/docker-php-ext-install | 7 ++++++- 5.6/fpm/docker-php-ext-install | 7 ++++++- docker-php-ext-install | 7 ++++++- 10 files changed, 60 insertions(+), 10 deletions(-) diff --git a/5.4/apache/docker-php-ext-install b/5.4/apache/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.4/apache/docker-php-ext-install +++ b/5.4/apache/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.4/docker-php-ext-install b/5.4/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.4/docker-php-ext-install +++ b/5.4/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.4/fpm/docker-php-ext-install b/5.4/fpm/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.4/fpm/docker-php-ext-install +++ b/5.4/fpm/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.5/apache/docker-php-ext-install b/5.5/apache/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.5/apache/docker-php-ext-install +++ b/5.5/apache/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.5/docker-php-ext-install b/5.5/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.5/docker-php-ext-install +++ b/5.5/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.5/fpm/docker-php-ext-install b/5.5/fpm/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.5/fpm/docker-php-ext-install +++ b/5.5/fpm/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.6/apache/docker-php-ext-install b/5.6/apache/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.6/apache/docker-php-ext-install +++ b/5.6/apache/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.6/docker-php-ext-install b/5.6/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.6/docker-php-ext-install +++ b/5.6/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/5.6/fpm/docker-php-ext-install b/5.6/fpm/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/5.6/fpm/docker-php-ext-install +++ b/5.6/fpm/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi diff --git a/docker-php-ext-install b/docker-php-ext-install index abca7fff26402..ca65449d4fa5a 100755 --- a/docker-php-ext-install +++ b/docker-php-ext-install @@ -44,7 +44,12 @@ for ext in "${exts[@]}"; do ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" for module in modules/*.so; do if [ -f "$module" ]; then - line="extension=$(basename "$module")" + if grep -q zend_extension_entry "$module"; then + # https://wiki.php.net/internals/extensions#loading_zend_extensions + line="zend_extension=$(basename "$module")" + else + line="extension=$(basename "$module")" + fi if ! grep -q "$line" "$ini"; then echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" fi From 2482d466611d497fc2c6b7f3268ed0cae8ee9144 Mon Sep 17 00:00:00 2001 From: Baptiste Donaux Date: Thu, 11 Dec 2014 15:53:23 +0100 Subject: [PATCH 52/60] [5.4][fpm][php-fpm.conf] Impossible to listen on [::]:9000. Replace by 9000 --- 5.4/fpm/php-fpm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5.4/fpm/php-fpm.conf b/5.4/fpm/php-fpm.conf index 20c834fe116e4..6a74b972063eb 100644 --- a/5.4/fpm/php-fpm.conf +++ b/5.4/fpm/php-fpm.conf @@ -14,7 +14,7 @@ access.log = /proc/self/fd/2 user = www-data group = www-data -listen = [::]:9000 +listen = 9000 pm = dynamic pm.max_children = 5 From 938bbe3bad664cc4ec93d982934fd250a57d6d3b Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 18 Dec 2014 14:33:25 -0800 Subject: [PATCH 53/60] Run update.sh --- 5.5/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/5.5/Dockerfile b/5.5/Dockerfile index fa368734d2179..71935650e7499 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.19 +ENV PHP_VERSION 5.5.20 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From 4bb8f8678056630c0322364d080acd585baef95d Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 18 Dec 2014 15:35:35 -0800 Subject: [PATCH 54/60] Run update again to fix apache and fpm versions --- 5.5/apache/Dockerfile | 2 +- 5.5/fpm/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 3e0c5a3940746..dbe927a1ff55a 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.19 +ENV PHP_VERSION 5.5.20 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.5/fpm/Dockerfile b/5.5/fpm/Dockerfile index b3b6bd1d02a3f..22e7ad14583a0 100644 --- a/5.5/fpm/Dockerfile +++ b/5.5/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.19 +ENV PHP_VERSION 5.5.20 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From be46002aeedac80205e5d7a54a93169c6fa8bc51 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 19 Dec 2014 00:38:41 -0700 Subject: [PATCH 55/60] Bump to 5.6.4 and 5.4.36 --- 5.4/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 26900edac10b8..09c251895830b 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.35 +ENV PHP_VERSION 5.4.36 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index e500df9429073..f0499b38c35ac 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.3 +ENV PHP_VERSION 5.6.4 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From f972d91aac11cf41e5de6d24a45dcb1bb00f221d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 19 Dec 2014 01:24:48 -0700 Subject: [PATCH 56/60] Update variants too... --- 5.4/apache/Dockerfile | 2 +- 5.4/fpm/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 5.6/fpm/Dockerfile | 2 +- update.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 094bad3912b96..4d0d2e940d5ff 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.35 +ENV PHP_VERSION 5.4.36 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.4/fpm/Dockerfile b/5.4/fpm/Dockerfile index 78baa32a992d2..64a78069552eb 100644 --- a/5.4/fpm/Dockerfile +++ b/5.4/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.35 +ENV PHP_VERSION 5.4.36 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 7ac90e24046d9..2a711af37a664 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.3 +ENV PHP_VERSION 5.6.4 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index 22ac8016b27dc..52a2863967df3 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.3 +ENV PHP_VERSION 5.6.4 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/update.sh b/update.sh index 63bb723114a98..ac1307bc67877 100755 --- a/update.sh +++ b/update.sh @@ -50,7 +50,7 @@ for version in "${versions[@]}"; do sed -ri ' s/^(ENV PHP_VERSION) .*/\1 '"$fullVersion"'/; s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ - ' "$version/Dockerfile" + ' "$version/Dockerfile" "$version/"*/Dockerfile cp apache2.conf "$version/apache/" cp php-fpm.conf "$version/fpm/" From a51c16e5f91be6243452471d1454dca5b168e3d4 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 19 Dec 2014 14:23:06 -0800 Subject: [PATCH 57/60] Add a pid cleaner in case container was killed unexpectedly --- 5.4/apache/Dockerfile | 3 +- 5.4/apache/apache2-foreground | 7 ++++ 5.5/apache/Dockerfile | 3 +- 5.5/apache/apache2-foreground | 7 ++++ 5.6/apache/Dockerfile | 3 +- 5.6/apache/apache2-foreground | 7 ++++ apache-Dockerfile-block-2 | 3 +- apache2.conf | 62 ----------------------------------- php-fpm.conf | 23 ------------- update.sh | 3 -- 10 files changed, 29 insertions(+), 92 deletions(-) create mode 100755 5.4/apache/apache2-foreground create mode 100755 5.5/apache/apache2-foreground create mode 100755 5.6/apache/apache2-foreground delete mode 100644 apache2.conf delete mode 100644 php-fpm.conf diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 4d0d2e940d5ff..d67a2b7ad9f15 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -67,8 +67,9 @@ RUN buildDeps=" \ COPY docker-php-ext-* /usr/local/bin/ #### +COPY apache2-foreground /usr/local/bin/ WORKDIR /var/www/html EXPOSE 80 -CMD ["apache2", "-DFOREGROUND"] +CMD ["apache2-foreground"] #### diff --git a/5.4/apache/apache2-foreground b/5.4/apache/apache2-foreground new file mode 100755 index 0000000000000..70def2f2ad2fa --- /dev/null +++ b/5.4/apache/apache2-foreground @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /var/run/apache2/apache2.pid + +exec apache2 -DFOREGROUND diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index dbe927a1ff55a..24600ba27051d 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -67,8 +67,9 @@ RUN buildDeps=" \ COPY docker-php-ext-* /usr/local/bin/ #### +COPY apache2-foreground /usr/local/bin/ WORKDIR /var/www/html EXPOSE 80 -CMD ["apache2", "-DFOREGROUND"] +CMD ["apache2-foreground"] #### diff --git a/5.5/apache/apache2-foreground b/5.5/apache/apache2-foreground new file mode 100755 index 0000000000000..70def2f2ad2fa --- /dev/null +++ b/5.5/apache/apache2-foreground @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /var/run/apache2/apache2.pid + +exec apache2 -DFOREGROUND diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 2a711af37a664..6c76d8a2bdb67 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -67,8 +67,9 @@ RUN buildDeps=" \ COPY docker-php-ext-* /usr/local/bin/ #### +COPY apache2-foreground /usr/local/bin/ WORKDIR /var/www/html EXPOSE 80 -CMD ["apache2", "-DFOREGROUND"] +CMD ["apache2-foreground"] #### diff --git a/5.6/apache/apache2-foreground b/5.6/apache/apache2-foreground new file mode 100755 index 0000000000000..70def2f2ad2fa --- /dev/null +++ b/5.6/apache/apache2-foreground @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /var/run/apache2/apache2.pid + +exec apache2 -DFOREGROUND diff --git a/apache-Dockerfile-block-2 b/apache-Dockerfile-block-2 index 0dd7f61e0921c..613378a197388 100644 --- a/apache-Dockerfile-block-2 +++ b/apache-Dockerfile-block-2 @@ -1,4 +1,5 @@ +COPY apache2-foreground /usr/local/bin/ WORKDIR /var/www/html EXPOSE 80 -CMD ["apache2", "-DFOREGROUND"] +CMD ["apache2-foreground"] diff --git a/apache2.conf b/apache2.conf deleted file mode 100644 index 09f4a920b8e10..0000000000000 --- a/apache2.conf +++ /dev/null @@ -1,62 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /proc/self/fd/2 -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -# ports.conf -Listen 80 - - Listen 443 - - - Listen 443 - - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - Options Indexes FollowSymLinks - AllowOverride All - Require all granted - - -DocumentRoot /var/www/html - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /proc/self/fd/1 combined - - - SetHandler application/x-httpd-php - - -# Multiple DirectoryIndex directives within the same context will add -# to the list of resources to look for rather than replace -# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -DirectoryIndex disabled -DirectoryIndex index.php index.html diff --git a/php-fpm.conf b/php-fpm.conf deleted file mode 100644 index 20c834fe116e4..0000000000000 --- a/php-fpm.conf +++ /dev/null @@ -1,23 +0,0 @@ -; This file was initially adapated from the output of: (on PHP 5.6) -; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default - -[global] - -error_log = /proc/self/fd/2 -daemonize = no - -[www] - -; if we send this to /proc/self/fd/1, it never appears -access.log = /proc/self/fd/2 - -user = www-data -group = www-data - -listen = [::]:9000 - -pm = dynamic -pm.max_children = 5 -pm.start_servers = 2 -pm.min_spare_servers = 1 -pm.max_spare_servers = 3 diff --git a/update.sh b/update.sh index ac1307bc67877..88ccef65bf775 100755 --- a/update.sh +++ b/update.sh @@ -51,9 +51,6 @@ for version in "${versions[@]}"; do s/^(ENV PHP_VERSION) .*/\1 '"$fullVersion"'/; s/^(RUN gpg .* --recv-keys) [0-9a-fA-F ]*$/\1 '"$gpgKey"'/ ' "$version/Dockerfile" "$version/"*/Dockerfile - - cp apache2.conf "$version/apache/" - cp php-fpm.conf "$version/fpm/" ) done From 5d49ba5861c0245da96132b011c8dbdad8c28188 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 8 Jan 2015 23:41:19 -0700 Subject: [PATCH 58/60] Switch from pgp.mit.edu to pool.sks-keyservers.net --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.4/fpm/Dockerfile | 2 +- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.5/fpm/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 5.6/fpm/Dockerfile | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index 09c251895830b..bafae517cf1d7 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -12,7 +12,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### #### -RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.36 diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index d67a2b7ad9f15..9449351c1d85f 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -25,7 +25,7 @@ ENV PHP_EXTRA_BUILD_DEPS apache2-dev ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 #### -RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.36 diff --git a/5.4/fpm/Dockerfile b/5.4/fpm/Dockerfile index 64a78069552eb..a498a90cbe5e4 100644 --- a/5.4/fpm/Dockerfile +++ b/5.4/fpm/Dockerfile @@ -13,7 +13,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data #### -RUN gpg --keyserver pgp.mit.edu --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D ENV PHP_VERSION 5.4.36 diff --git a/5.5/Dockerfile b/5.5/Dockerfile index 71935650e7499..e9b4dc92d1903 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -12,7 +12,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### #### -RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.20 diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 24600ba27051d..5eb22c4dafffc 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -25,7 +25,7 @@ ENV PHP_EXTRA_BUILD_DEPS apache2-dev ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 #### -RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.20 diff --git a/5.5/fpm/Dockerfile b/5.5/fpm/Dockerfile index 22e7ad14583a0..ecb094255aca5 100644 --- a/5.5/fpm/Dockerfile +++ b/5.5/fpm/Dockerfile @@ -13,7 +13,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data #### -RUN gpg --keyserver pgp.mit.edu --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D ENV PHP_VERSION 5.5.20 diff --git a/5.6/Dockerfile b/5.6/Dockerfile index f0499b38c35ac..494a9e1f55aaf 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -12,7 +12,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d #### #### -RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.4 diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 6c76d8a2bdb67..5e5d64cd0f1ba 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -25,7 +25,7 @@ ENV PHP_EXTRA_BUILD_DEPS apache2-dev ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 #### -RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.4 diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index 52a2863967df3..0837bda759865 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -13,7 +13,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data #### -RUN gpg --keyserver pgp.mit.edu --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 +RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 ENV PHP_VERSION 5.6.4 From c871678cc7c8dbc9277832e35f14f3534f2dd0fb Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 22 Jan 2015 13:12:12 -0800 Subject: [PATCH 59/60] Run update.sh, php 5.5 and 5.6 version bumped --- 5.5/Dockerfile | 2 +- 5.5/apache/Dockerfile | 2 +- 5.5/fpm/Dockerfile | 2 +- 5.6/Dockerfile | 2 +- 5.6/apache/Dockerfile | 2 +- 5.6/fpm/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/5.5/Dockerfile b/5.5/Dockerfile index e9b4dc92d1903..3fb5f8523247b 100644 --- a/5.5/Dockerfile +++ b/5.5/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.20 +ENV PHP_VERSION 5.5.21 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.5/apache/Dockerfile b/5.5/apache/Dockerfile index 5eb22c4dafffc..35435d1968686 100644 --- a/5.5/apache/Dockerfile +++ b/5.5/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.20 +ENV PHP_VERSION 5.5.21 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.5/fpm/Dockerfile b/5.5/fpm/Dockerfile index ecb094255aca5..9d5e16241c53a 100644 --- a/5.5/fpm/Dockerfile +++ b/5.5/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 0BD78B5F97500D450838F95DFE857D9A90D90EC1 0B96609E270F565C13292B24C13C70B87267B52D -ENV PHP_VERSION 5.5.20 +ENV PHP_VERSION 5.5.21 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 494a9e1f55aaf..1b04ba7977f0b 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.4 +ENV PHP_VERSION 5.6.5 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index 5e5d64cd0f1ba..f584653ef2271 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.4 +ENV PHP_VERSION 5.6.5 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index 0837bda759865..412d175d47f8a 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 -ENV PHP_VERSION 5.6.4 +ENV PHP_VERSION 5.6.5 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ From d506059bc4361bfe9b0ce536c7d94f76a37d2c02 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 23 Jan 2015 08:59:47 -0800 Subject: [PATCH 60/60] Run update.sh to bump 5.4 --- 5.4/Dockerfile | 2 +- 5.4/apache/Dockerfile | 2 +- 5.4/fpm/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/5.4/Dockerfile b/5.4/Dockerfile index bafae517cf1d7..b30eca94ceccc 100644 --- a/5.4/Dockerfile +++ b/5.4/Dockerfile @@ -14,7 +14,7 @@ RUN mkdir -p $PHP_INI_DIR/conf.d RUN gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.36 +ENV PHP_VERSION 5.4.37 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.4/apache/Dockerfile b/5.4/apache/Dockerfile index 9449351c1d85f..85bbc4d0c3b1d 100644 --- a/5.4/apache/Dockerfile +++ b/5.4/apache/Dockerfile @@ -27,7 +27,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 RUN gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.36 +ENV PHP_VERSION 5.4.37 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \ diff --git a/5.4/fpm/Dockerfile b/5.4/fpm/Dockerfile index a498a90cbe5e4..03a7aa92c0fcc 100644 --- a/5.4/fpm/Dockerfile +++ b/5.4/fpm/Dockerfile @@ -15,7 +15,7 @@ ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-gr RUN gpg --keyserver pool.sks-keyservers.net --recv-keys F38252826ACD957EF380D39F2F7956BC5DA04B5D -ENV PHP_VERSION 5.4.36 +ENV PHP_VERSION 5.4.37 # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) RUN buildDeps=" \