Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker-library images #3864

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

tianon
Copy link
Member

@tianon tianon commented Jan 3, 2018

- `cassandra`: add `docker-entrypoint.sh` to PATH (docker-library/cassandra#130)
- `ghost`: 1.19.1
- `haproxy`: 1.6.14, 1.7.10
- `nextcloud`: redis-3.1.6, APCu-5.1.9
- `php`: better libs-preserving code (docker-library/php#556)
- `redmine`: add `sqlserver` database adapter (docker-library/redmine#100)
- `rocket.chat`: 0.60.3
- `wordpress`: remove `-dev` dependencies (docker-library/wordpress#267)
@tianon
Copy link
Member Author

tianon commented Jan 3, 2018

Diff:
diff --git a/_bashbrew-list b/_bashbrew-list
index f660a9f..b6f829e 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -19,8 +19,8 @@ ghost:1
 ghost:1-alpine
 ghost:1.19
 ghost:1.19-alpine
-ghost:1.19.0
-ghost:1.19.0-alpine
+ghost:1.19.1
+ghost:1.19.1-alpine
 ghost:alpine
 ghost:latest
 haproxy:1
@@ -35,12 +35,12 @@ haproxy:1.5.19
 haproxy:1.5.19-alpine
 haproxy:1.6
 haproxy:1.6-alpine
-haproxy:1.6.13
-haproxy:1.6.13-alpine
+haproxy:1.6.14
+haproxy:1.6.14-alpine
 haproxy:1.7
 haproxy:1.7-alpine
-haproxy:1.7.9
-haproxy:1.7.9-alpine
+haproxy:1.7.10
+haproxy:1.7.10-alpine
 haproxy:1.8
 haproxy:1.8-alpine
 haproxy:1.8.3
@@ -300,7 +300,7 @@ redmine:latest
 redmine:passenger
 rocket.chat:0
 rocket.chat:0.60
-rocket.chat:0.60.2
+rocket.chat:0.60.3
 rocket.chat:latest
 wordpress:4
 wordpress:4-apache
diff --git a/cassandra_2.1/Dockerfile b/cassandra_2.1/Dockerfile
index 35ddd61..7b87a4d 100644
--- a/cassandra_2.1/Dockerfile
+++ b/cassandra_2.1/Dockerfile
@@ -132,8 +132,9 @@ RUN set -ex; \
 # https://issues.apache.org/jira/browse/CASSANDRA-11661
 	sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh"
 
-COPY docker-entrypoint.sh /docker-entrypoint.sh
-ENTRYPOINT ["/docker-entrypoint.sh"]
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
 
 RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \
 	&& chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \
diff --git a/cassandra_2.1/docker-entrypoint.sh b/cassandra_2.1/docker-entrypoint.sh
index 16d183a..151adad 100755
--- a/cassandra_2.1/docker-entrypoint.sh
+++ b/cassandra_2.1/docker-entrypoint.sh
@@ -2,7 +2,8 @@
 set -e
 
 # first arg is `-f` or `--some-option`
-if [ "${1:0:1}" = '-' ]; then
+# or there are no args
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
 	set -- cassandra -f "$@"
 fi
 
diff --git a/cassandra_2/Dockerfile b/cassandra_2/Dockerfile
index 86013fb..c538f57 100644
--- a/cassandra_2/Dockerfile
+++ b/cassandra_2/Dockerfile
@@ -132,8 +132,9 @@ RUN set -ex; \
 # https://issues.apache.org/jira/browse/CASSANDRA-11661
 	sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh"
 
-COPY docker-entrypoint.sh /docker-entrypoint.sh
-ENTRYPOINT ["/docker-entrypoint.sh"]
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
 
 RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \
 	&& chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \
diff --git a/cassandra_2/docker-entrypoint.sh b/cassandra_2/docker-entrypoint.sh
index 16d183a..151adad 100755
--- a/cassandra_2/docker-entrypoint.sh
+++ b/cassandra_2/docker-entrypoint.sh
@@ -2,7 +2,8 @@
 set -e
 
 # first arg is `-f` or `--some-option`
-if [ "${1:0:1}" = '-' ]; then
+# or there are no args
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
 	set -- cassandra -f "$@"
 fi
 
diff --git a/cassandra_3.0/Dockerfile b/cassandra_3.0/Dockerfile
index 56d67d4..0a6c7fa 100644
--- a/cassandra_3.0/Dockerfile
+++ b/cassandra_3.0/Dockerfile
@@ -132,8 +132,9 @@ RUN set -ex; \
 # https://issues.apache.org/jira/browse/CASSANDRA-11661
 	sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh"
 
-COPY docker-entrypoint.sh /docker-entrypoint.sh
-ENTRYPOINT ["/docker-entrypoint.sh"]
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
 
 RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \
 	&& chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \
diff --git a/cassandra_3.0/docker-entrypoint.sh b/cassandra_3.0/docker-entrypoint.sh
index 16d183a..151adad 100755
--- a/cassandra_3.0/docker-entrypoint.sh
+++ b/cassandra_3.0/docker-entrypoint.sh
@@ -2,7 +2,8 @@
 set -e
 
 # first arg is `-f` or `--some-option`
-if [ "${1:0:1}" = '-' ]; then
+# or there are no args
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
 	set -- cassandra -f "$@"
 fi
 
diff --git a/cassandra_latest/Dockerfile b/cassandra_latest/Dockerfile
index 02c1d15..7ed873e 100644
--- a/cassandra_latest/Dockerfile
+++ b/cassandra_latest/Dockerfile
@@ -132,8 +132,9 @@ RUN set -ex; \
 # https://issues.apache.org/jira/browse/CASSANDRA-11661
 	sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh"
 
-COPY docker-entrypoint.sh /docker-entrypoint.sh
-ENTRYPOINT ["/docker-entrypoint.sh"]
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
 
 RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \
 	&& chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \
diff --git a/cassandra_latest/docker-entrypoint.sh b/cassandra_latest/docker-entrypoint.sh
index 16d183a..151adad 100755
--- a/cassandra_latest/docker-entrypoint.sh
+++ b/cassandra_latest/docker-entrypoint.sh
@@ -2,7 +2,8 @@
 set -e
 
 # first arg is `-f` or `--some-option`
-if [ "${1:0:1}" = '-' ]; then
+# or there are no args
+if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then
 	set -- cassandra -f "$@"
 fi
 
diff --git a/ghost_alpine/Dockerfile b/ghost_alpine/Dockerfile
index a1ab201..789e781 100644
--- a/ghost_alpine/Dockerfile
+++ b/ghost_alpine/Dockerfile
@@ -17,7 +17,7 @@ RUN npm install -g "ghost-cli@$GHOST_CLI_VERSION"
 ENV GHOST_INSTALL /var/lib/ghost
 ENV GHOST_CONTENT /var/lib/ghost/content
 
-ENV GHOST_VERSION 1.19.0
+ENV GHOST_VERSION 1.19.1
 
 RUN set -ex; \
 	mkdir -p "$GHOST_INSTALL"; \
diff --git a/ghost_latest/Dockerfile b/ghost_latest/Dockerfile
index a98a381..2990ff8 100644
--- a/ghost_latest/Dockerfile
+++ b/ghost_latest/Dockerfile
@@ -22,7 +22,7 @@ RUN npm install -g "ghost-cli@$GHOST_CLI_VERSION"
 ENV GHOST_INSTALL /var/lib/ghost
 ENV GHOST_CONTENT /var/lib/ghost/content
 
-ENV GHOST_VERSION 1.19.0
+ENV GHOST_VERSION 1.19.1
 
 RUN set -ex; \
 	mkdir -p "$GHOST_INSTALL"; \
diff --git a/haproxy_1.6-alpine/Dockerfile b/haproxy_1.6-alpine/Dockerfile
index 592114a..54c9df4 100644
--- a/haproxy_1.6-alpine/Dockerfile
+++ b/haproxy_1.6-alpine/Dockerfile
@@ -1,8 +1,8 @@
 FROM alpine:3.5
 
 ENV HAPROXY_MAJOR 1.6
-ENV HAPROXY_VERSION 1.6.13
-ENV HAPROXY_MD5 782947642c0c7983f73624d8d45e2321
+ENV HAPROXY_VERSION 1.6.14
+ENV HAPROXY_MD5 5daf73eb70052e8ec66c40817f265202
 
 # https://www.lua.org/ftp/#source
 ENV LUA_VERSION=5.3.4 \
diff --git a/haproxy_1.6/Dockerfile b/haproxy_1.6/Dockerfile
index 74bc1f3..f509654 100644
--- a/haproxy_1.6/Dockerfile
+++ b/haproxy_1.6/Dockerfile
@@ -8,8 +8,8 @@ RUN apt-get update \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV HAPROXY_MAJOR 1.6
-ENV HAPROXY_VERSION 1.6.13
-ENV HAPROXY_MD5 782947642c0c7983f73624d8d45e2321
+ENV HAPROXY_VERSION 1.6.14
+ENV HAPROXY_MD5 5daf73eb70052e8ec66c40817f265202
 
 # see http://sources.debian.net/src/haproxy/jessie/debian/rules/ for some helpful navigation of the possible "make" arguments
 RUN set -x \
diff --git a/haproxy_1.7-alpine/Dockerfile b/haproxy_1.7-alpine/Dockerfile
index 6dfb879..f871ded 100644
--- a/haproxy_1.7-alpine/Dockerfile
+++ b/haproxy_1.7-alpine/Dockerfile
@@ -1,8 +1,8 @@
 FROM alpine:3.5
 
 ENV HAPROXY_MAJOR 1.7
-ENV HAPROXY_VERSION 1.7.9
-ENV HAPROXY_MD5 a2bbbdd45ffe18d99cdcf26aa992f92d
+ENV HAPROXY_VERSION 1.7.10
+ENV HAPROXY_MD5 a9b98a228660dee5ee65b62e3bd57822
 
 # https://www.lua.org/ftp/#source
 ENV LUA_VERSION=5.3.4 \
diff --git a/haproxy_1.7/Dockerfile b/haproxy_1.7/Dockerfile
index 44fa2ec..01a3ee4 100644
--- a/haproxy_1.7/Dockerfile
+++ b/haproxy_1.7/Dockerfile
@@ -8,8 +8,8 @@ RUN apt-get update \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV HAPROXY_MAJOR 1.7
-ENV HAPROXY_VERSION 1.7.9
-ENV HAPROXY_MD5 a2bbbdd45ffe18d99cdcf26aa992f92d
+ENV HAPROXY_VERSION 1.7.10
+ENV HAPROXY_MD5 a9b98a228660dee5ee65b62e3bd57822
 
 # see http://sources.debian.net/src/haproxy/jessie/debian/rules/ for some helpful navigation of the possible "make" arguments
 RUN set -x \
diff --git a/nextcloud_11-fpm/Dockerfile b/nextcloud_11-fpm/Dockerfile
index 43756d3..79c928c 100644
--- a/nextcloud_11-fpm/Dockerfile
+++ b/nextcloud_11-fpm/Dockerfile
@@ -35,9 +35,9 @@ RUN { \
 
 # PECL extensions
 RUN set -ex \
- && pecl install APCu-5.1.8 \
+ && pecl install APCu-5.1.9 \
  && pecl install memcached-3.0.4 \
- && pecl install redis-3.1.5 \
+ && pecl install redis-3.1.6 \
  && docker-php-ext-enable apcu redis memcached
 
 ENV NEXTCLOUD_VERSION 11.0.6
diff --git a/nextcloud_11/Dockerfile b/nextcloud_11/Dockerfile
index 7cce7d0..e591916 100644
--- a/nextcloud_11/Dockerfile
+++ b/nextcloud_11/Dockerfile
@@ -36,9 +36,9 @@ RUN a2enmod rewrite
 
 # PECL extensions
 RUN set -ex \
- && pecl install APCu-5.1.8 \
+ && pecl install APCu-5.1.9 \
  && pecl install memcached-3.0.4 \
- && pecl install redis-3.1.5 \
+ && pecl install redis-3.1.6 \
  && docker-php-ext-enable apcu redis memcached
 RUN a2enmod rewrite
 
diff --git a/nextcloud_fpm/Dockerfile b/nextcloud_fpm/Dockerfile
index 5963ba7..0b7f23f 100644
--- a/nextcloud_fpm/Dockerfile
+++ b/nextcloud_fpm/Dockerfile
@@ -35,9 +35,9 @@ RUN { \
 
 # PECL extensions
 RUN set -ex \
- && pecl install APCu-5.1.8 \
+ && pecl install APCu-5.1.9 \
  && pecl install memcached-3.0.4 \
- && pecl install redis-3.1.5 \
+ && pecl install redis-3.1.6 \
  && docker-php-ext-enable apcu redis memcached
 
 ENV NEXTCLOUD_VERSION 12.0.4
diff --git a/nextcloud_latest/Dockerfile b/nextcloud_latest/Dockerfile
index f293728..91b7bad 100644
--- a/nextcloud_latest/Dockerfile
+++ b/nextcloud_latest/Dockerfile
@@ -36,9 +36,9 @@ RUN a2enmod rewrite
 
 # PECL extensions
 RUN set -ex \
- && pecl install APCu-5.1.8 \
+ && pecl install APCu-5.1.9 \
  && pecl install memcached-3.0.4 \
- && pecl install redis-3.1.5 \
+ && pecl install redis-3.1.6 \
  && docker-php-ext-enable apcu redis memcached
 RUN a2enmod rewrite
 
diff --git a/php_5-alpine/docker-php-ext-configure b/php_5-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5-alpine/docker-php-ext-configure
+++ b/php_5-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_5-apache/Dockerfile b/php_5-apache/Dockerfile
index 1162334..7b53c4b 100644
--- a/php_5-apache/Dockerfile
+++ b/php_5-apache/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -158,30 +155,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -205,19 +207,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_5-apache/docker-php-ext-configure b/php_5-apache/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5-apache/docker-php-ext-configure
+++ b/php_5-apache/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_5-fpm-alpine/docker-php-ext-configure b/php_5-fpm-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5-fpm-alpine/docker-php-ext-configure
+++ b/php_5-fpm-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_5-fpm/Dockerfile b/php_5-fpm/Dockerfile
index 22c4cd5..44a1171 100644
--- a/php_5-fpm/Dockerfile
+++ b/php_5-fpm/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,30 +97,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -147,19 +149,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_5-fpm/docker-php-ext-configure b/php_5-fpm/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5-fpm/docker-php-ext-configure
+++ b/php_5-fpm/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_5-zts-alpine/docker-php-ext-configure b/php_5-zts-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5-zts-alpine/docker-php-ext-configure
+++ b/php_5-zts-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_5-zts/Dockerfile b/php_5-zts/Dockerfile
index 688a6db..2125bd0 100644
--- a/php_5-zts/Dockerfile
+++ b/php_5-zts/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,30 +97,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -147,19 +149,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_5-zts/docker-php-ext-configure b/php_5-zts/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5-zts/docker-php-ext-configure
+++ b/php_5-zts/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_5/Dockerfile b/php_5/Dockerfile
index e015a3d..8cfdeba 100644
--- a/php_5/Dockerfile
+++ b/php_5/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -99,30 +96,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -146,19 +148,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_5/docker-php-ext-configure b/php_5/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_5/docker-php-ext-configure
+++ b/php_5/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0-alpine/docker-php-ext-configure b/php_7.0-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0-alpine/docker-php-ext-configure
+++ b/php_7.0-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0-apache/Dockerfile b/php_7.0-apache/Dockerfile
index 555dc1c..b7e46b0 100644
--- a/php_7.0-apache/Dockerfile
+++ b/php_7.0-apache/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -158,30 +155,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -205,19 +207,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.0-apache/docker-php-ext-configure b/php_7.0-apache/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0-apache/docker-php-ext-configure
+++ b/php_7.0-apache/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0-fpm-alpine/docker-php-ext-configure b/php_7.0-fpm-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0-fpm-alpine/docker-php-ext-configure
+++ b/php_7.0-fpm-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0-fpm/Dockerfile b/php_7.0-fpm/Dockerfile
index c452ebe..a030d85 100644
--- a/php_7.0-fpm/Dockerfile
+++ b/php_7.0-fpm/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,30 +97,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -147,19 +149,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.0-fpm/docker-php-ext-configure b/php_7.0-fpm/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0-fpm/docker-php-ext-configure
+++ b/php_7.0-fpm/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0-zts-alpine/docker-php-ext-configure b/php_7.0-zts-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0-zts-alpine/docker-php-ext-configure
+++ b/php_7.0-zts-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0-zts/Dockerfile b/php_7.0-zts/Dockerfile
index a1b7f71..a342578 100644
--- a/php_7.0-zts/Dockerfile
+++ b/php_7.0-zts/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,30 +97,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -147,19 +149,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.0-zts/docker-php-ext-configure b/php_7.0-zts/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0-zts/docker-php-ext-configure
+++ b/php_7.0-zts/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.0/Dockerfile b/php_7.0/Dockerfile
index 7c7e9f0..581be45 100644
--- a/php_7.0/Dockerfile
+++ b/php_7.0/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -99,30 +96,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -146,19 +148,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.0/docker-php-ext-configure b/php_7.0/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.0/docker-php-ext-configure
+++ b/php_7.0/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1-alpine/docker-php-ext-configure b/php_7.1-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1-alpine/docker-php-ext-configure
+++ b/php_7.1-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1-apache/Dockerfile b/php_7.1-apache/Dockerfile
index 11a6fcb..b172bfb 100644
--- a/php_7.1-apache/Dockerfile
+++ b/php_7.1-apache/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -158,30 +155,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -205,19 +207,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.1-apache/docker-php-ext-configure b/php_7.1-apache/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1-apache/docker-php-ext-configure
+++ b/php_7.1-apache/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1-fpm-alpine/docker-php-ext-configure b/php_7.1-fpm-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1-fpm-alpine/docker-php-ext-configure
+++ b/php_7.1-fpm-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1-fpm/Dockerfile b/php_7.1-fpm/Dockerfile
index b423e62..fd0dcb9 100644
--- a/php_7.1-fpm/Dockerfile
+++ b/php_7.1-fpm/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,30 +97,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -147,19 +149,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.1-fpm/docker-php-ext-configure b/php_7.1-fpm/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1-fpm/docker-php-ext-configure
+++ b/php_7.1-fpm/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1-zts-alpine/docker-php-ext-configure b/php_7.1-zts-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1-zts-alpine/docker-php-ext-configure
+++ b/php_7.1-zts-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1-zts/Dockerfile b/php_7.1-zts/Dockerfile
index cf92771..562cc83 100644
--- a/php_7.1-zts/Dockerfile
+++ b/php_7.1-zts/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,30 +97,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -147,19 +149,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.1-zts/docker-php-ext-configure b/php_7.1-zts/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1-zts/docker-php-ext-configure
+++ b/php_7.1-zts/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_7.1/Dockerfile b/php_7.1/Dockerfile
index cf946d3..a9bec5b 100644
--- a/php_7.1/Dockerfile
+++ b/php_7.1/Dockerfile
@@ -30,9 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -99,30 +96,35 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libcurl4-openssl-dev \
 		libedit-dev \
 		libsqlite3-dev \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -146,19 +148,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_7.1/docker-php-ext-configure b/php_7.1/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_7.1/docker-php-ext-configure
+++ b/php_7.1/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_alpine/docker-php-ext-configure b/php_alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_alpine/docker-php-ext-configure
+++ b/php_alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_alpine3.7/docker-php-ext-configure b/php_alpine3.7/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_alpine3.7/docker-php-ext-configure
+++ b/php_alpine3.7/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_apache/Dockerfile b/php_apache/Dockerfile
index 4213667..0c2c836 100644
--- a/php_apache/Dockerfile
+++ b/php_apache/Dockerfile
@@ -30,10 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libargon2-0 \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -159,9 +155,11 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libargon2-0-dev \
 		libcurl4-openssl-dev \
 		libedit-dev \
@@ -169,21 +167,24 @@ RUN set -xe \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -209,19 +210,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_apache/docker-php-ext-configure b/php_apache/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_apache/docker-php-ext-configure
+++ b/php_apache/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_fpm-alpine/docker-php-ext-configure b/php_fpm-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_fpm-alpine/docker-php-ext-configure
+++ b/php_fpm-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_fpm-alpine3.7/docker-php-ext-configure b/php_fpm-alpine3.7/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_fpm-alpine3.7/docker-php-ext-configure
+++ b/php_fpm-alpine3.7/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_fpm/Dockerfile b/php_fpm/Dockerfile
index 20de860..8f57309 100644
--- a/php_fpm/Dockerfile
+++ b/php_fpm/Dockerfile
@@ -30,10 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libargon2-0 \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -101,9 +97,11 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libargon2-0-dev \
 		libcurl4-openssl-dev \
 		libedit-dev \
@@ -111,21 +109,24 @@ RUN set -xe \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -151,19 +152,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_fpm/docker-php-ext-configure b/php_fpm/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_fpm/docker-php-ext-configure
+++ b/php_fpm/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_latest/Dockerfile b/php_latest/Dockerfile
index cab3279..569292d 100644
--- a/php_latest/Dockerfile
+++ b/php_latest/Dockerfile
@@ -30,10 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libargon2-0 \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -100,9 +96,11 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libargon2-0-dev \
 		libcurl4-openssl-dev \
 		libedit-dev \
@@ -110,21 +108,24 @@ RUN set -xe \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -150,19 +151,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_latest/docker-php-ext-configure b/php_latest/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_latest/docker-php-ext-configure
+++ b/php_latest/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_zts-alpine/docker-php-ext-configure b/php_zts-alpine/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_zts-alpine/docker-php-ext-configure
+++ b/php_zts-alpine/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_zts-alpine3.7/docker-php-ext-configure b/php_zts-alpine3.7/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_zts-alpine3.7/docker-php-ext-configure
+++ b/php_zts-alpine3.7/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/php_zts/Dockerfile b/php_zts/Dockerfile
index d932c31..358a970 100644
--- a/php_zts/Dockerfile
+++ b/php_zts/Dockerfile
@@ -30,10 +30,6 @@ RUN apt-get update && apt-get install -y \
 		$PHPIZE_DEPS \
 		ca-certificates \
 		curl \
-		libargon2-0 \
-		libedit2 \
-		libsqlite3-0 \
-		libxml2 \
 		xz-utils \
 	--no-install-recommends && rm -r /var/lib/apt/lists/*
 
@@ -101,9 +97,11 @@ RUN set -xe; \
 
 COPY docker-php-source /usr/local/bin/
 
-RUN set -xe \
-	&& buildDeps=" \
-		$PHP_EXTRA_BUILD_DEPS \
+RUN set -eux; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
+	apt-get update; \
+	apt-get install -y --no-install-recommends \
 		libargon2-0-dev \
 		libcurl4-openssl-dev \
 		libedit-dev \
@@ -111,21 +109,24 @@ RUN set -xe \
 		libssl-dev \
 		libxml2-dev \
 		zlib1g-dev \
-	" \
-	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
+		${PHP_EXTRA_BUILD_DEPS:-} \
+	; \
+	rm -rf /var/lib/apt/lists/*; \
 	\
-	&& export CFLAGS="$PHP_CFLAGS" \
+	export \
+		CFLAGS="$PHP_CFLAGS" \
 		CPPFLAGS="$PHP_CPPFLAGS" \
 		LDFLAGS="$PHP_LDFLAGS" \
-	&& docker-php-source extract \
-	&& cd /usr/src/php \
-	&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
-	&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
+	; \
+	docker-php-source extract; \
+	cd /usr/src/php; \
+	gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
+	debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
 # https://bugs.php.net/bug.php?id=74125
-	&& if [ ! -d /usr/include/curl ]; then \
+	if [ ! -d /usr/include/curl ]; then \
 		ln -sT "/usr/include/$debMultiarch/curl" /usr/local/include/curl; \
-	fi \
-	&& ./configure \
+	fi; \
+	./configure \
 		--build="$gnuArch" \
 		--with-config-file-path="$PHP_INI_DIR" \
 		--with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
@@ -151,19 +152,33 @@ RUN set -xe \
 		$(test "$gnuArch" = 's390x-linux-gnu' && echo '--without-pcre-jit') \
 		--with-libdir="lib/$debMultiarch" \
 		\
-		$PHP_EXTRA_CONFIGURE_ARGS \
-	&& make -j "$(nproc)" \
-	&& make install \
-	&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
-	&& make clean \
-	&& cd / \
-	&& docker-php-source delete \
+		${PHP_EXTRA_CONFIGURE_ARGS:-} \
+	; \
+	make -j "$(nproc)"; \
+	make install; \
+	find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; \
+	make clean; \
+	cd /; \
+	docker-php-source delete; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
+	find /usr/local -type f -executable -exec ldd '{}' ';' \
+		| awk '/=>/ { print $(NF-1) }' \
+		| sort -u \
+		| xargs -r dpkg-query --search \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -r apt-mark manual \
+	; \
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
 	\
-	&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $buildDeps \
+	php --version; \
 	\
 # https://github.com/docker-library/php/issues/443
-	&& pecl update-channels \
-	&& rm -rf /tmp/pear ~/.pearrc
+	pecl update-channels; \
+	rm -rf /tmp/pear ~/.pearrc
 
 COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
 
diff --git a/php_zts/docker-php-ext-configure b/php_zts/docker-php-ext-configure
index 661ad39..9e949e1 100755
--- a/php_zts/docker-php-ext-configure
+++ b/php_zts/docker-php-ext-configure
@@ -64,7 +64,6 @@ if command -v dpkg-architecture > /dev/null; then
 	set -- --build="$gnuArch" "$@"
 fi
 
-set -x
 cd "$ext"
 phpize
 ./configure "$@"
diff --git a/redmine_3.2/Dockerfile b/redmine_3.2/Dockerfile
index 25f7d9b..7c9fb14 100644
--- a/redmine_3.2/Dockerfile
+++ b/redmine_3.2/Dockerfile
@@ -72,7 +72,7 @@ RUN buildDeps=' \
 	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/* \
 	&& bundle install --without development test \
-	&& for adapter in mysql2 postgresql sqlite3; do \
+	&& for adapter in mysql2 postgresql sqlserver sqlite3; do \
 		echo "$RAILS_ENV:" > ./config/database.yml; \
 		echo "  adapter: $adapter" >> ./config/database.yml; \
 		bundle install --without development test; \
diff --git a/redmine_3.2/docker-entrypoint.sh b/redmine_3.2/docker-entrypoint.sh
index 5351c9d..e0a4ff5 100755
--- a/redmine_3.2/docker-entrypoint.sh
+++ b/redmine_3.2/docker-entrypoint.sh
@@ -28,6 +28,7 @@ case "$1" in
 		if [ ! -f './config/database.yml' ]; then
 			file_env 'REDMINE_DB_MYSQL'
 			file_env 'REDMINE_DB_POSTGRES'
+			file_env 'REDMINE_DB_SQLSERVER'
 			
 			if [ "$MYSQL_PORT_3306_TCP" ] && [ -z "$REDMINE_DB_MYSQL" ]; then
 				export REDMINE_DB_MYSQL='mysql'
@@ -51,9 +52,17 @@ case "$1" in
 				file_env 'REDMINE_DB_PASSWORD' "${POSTGRES_ENV_POSTGRES_PASSWORD}"
 				file_env 'REDMINE_DB_DATABASE' "${POSTGRES_ENV_POSTGRES_DB:-${REDMINE_DB_USERNAME:-}}"
 				file_env 'REDMINE_DB_ENCODING' 'utf8'
+			elif [ "$REDMINE_DB_SQLSERVER" ]; then
+				adapter='sqlserver'
+				host="$REDMINE_DB_SQLSERVER"
+				file_env 'REDMINE_DB_PORT' '1433'
+				file_env 'REDMINE_DB_USERNAME' ''
+				file_env 'REDMINE_DB_PASSWORD' ''
+				file_env 'REDMINE_DB_DATABASE' ''
+				file_env 'REDMINE_DB_ENCODING' ''
 			else
 				echo >&2
-				echo >&2 'warning: missing REDMINE_DB_MYSQL or REDMINE_DB_POSTGRES environment variables'
+				echo >&2 'warning: missing REDMINE_DB_MYSQL, REDMINE_DB_POSTGRES, or REDMINE_DB_SQLSERVER environment variables'
 				echo >&2
 				echo >&2 '*** Using sqlite3 as fallback. ***'
 				echo >&2
diff --git a/redmine_3.3/Dockerfile b/redmine_3.3/Dockerfile
index c2d48c5..9f59175 100644
--- a/redmine_3.3/Dockerfile
+++ b/redmine_3.3/Dockerfile
@@ -72,7 +72,7 @@ RUN buildDeps=' \
 	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/* \
 	&& bundle install --without development test \
-	&& for adapter in mysql2 postgresql sqlite3; do \
+	&& for adapter in mysql2 postgresql sqlserver sqlite3; do \
 		echo "$RAILS_ENV:" > ./config/database.yml; \
 		echo "  adapter: $adapter" >> ./config/database.yml; \
 		bundle install --without development test; \
diff --git a/redmine_3.3/docker-entrypoint.sh b/redmine_3.3/docker-entrypoint.sh
index 5351c9d..e0a4ff5 100755
--- a/redmine_3.3/docker-entrypoint.sh
+++ b/redmine_3.3/docker-entrypoint.sh
@@ -28,6 +28,7 @@ case "$1" in
 		if [ ! -f './config/database.yml' ]; then
 			file_env 'REDMINE_DB_MYSQL'
 			file_env 'REDMINE_DB_POSTGRES'
+			file_env 'REDMINE_DB_SQLSERVER'
 			
 			if [ "$MYSQL_PORT_3306_TCP" ] && [ -z "$REDMINE_DB_MYSQL" ]; then
 				export REDMINE_DB_MYSQL='mysql'
@@ -51,9 +52,17 @@ case "$1" in
 				file_env 'REDMINE_DB_PASSWORD' "${POSTGRES_ENV_POSTGRES_PASSWORD}"
 				file_env 'REDMINE_DB_DATABASE' "${POSTGRES_ENV_POSTGRES_DB:-${REDMINE_DB_USERNAME:-}}"
 				file_env 'REDMINE_DB_ENCODING' 'utf8'
+			elif [ "$REDMINE_DB_SQLSERVER" ]; then
+				adapter='sqlserver'
+				host="$REDMINE_DB_SQLSERVER"
+				file_env 'REDMINE_DB_PORT' '1433'
+				file_env 'REDMINE_DB_USERNAME' ''
+				file_env 'REDMINE_DB_PASSWORD' ''
+				file_env 'REDMINE_DB_DATABASE' ''
+				file_env 'REDMINE_DB_ENCODING' ''
 			else
 				echo >&2
-				echo >&2 'warning: missing REDMINE_DB_MYSQL or REDMINE_DB_POSTGRES environment variables'
+				echo >&2 'warning: missing REDMINE_DB_MYSQL, REDMINE_DB_POSTGRES, or REDMINE_DB_SQLSERVER environment variables'
 				echo >&2
 				echo >&2 '*** Using sqlite3 as fallback. ***'
 				echo >&2
diff --git a/redmine_latest/Dockerfile b/redmine_latest/Dockerfile
index 759ef29..8b4a55d 100644
--- a/redmine_latest/Dockerfile
+++ b/redmine_latest/Dockerfile
@@ -72,7 +72,7 @@ RUN buildDeps=' \
 	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/* \
 	&& bundle install --without development test \
-	&& for adapter in mysql2 postgresql sqlite3; do \
+	&& for adapter in mysql2 postgresql sqlserver sqlite3; do \
 		echo "$RAILS_ENV:" > ./config/database.yml; \
 		echo "  adapter: $adapter" >> ./config/database.yml; \
 		bundle install --without development test; \
diff --git a/redmine_latest/docker-entrypoint.sh b/redmine_latest/docker-entrypoint.sh
index 5351c9d..e0a4ff5 100755
--- a/redmine_latest/docker-entrypoint.sh
+++ b/redmine_latest/docker-entrypoint.sh
@@ -28,6 +28,7 @@ case "$1" in
 		if [ ! -f './config/database.yml' ]; then
 			file_env 'REDMINE_DB_MYSQL'
 			file_env 'REDMINE_DB_POSTGRES'
+			file_env 'REDMINE_DB_SQLSERVER'
 			
 			if [ "$MYSQL_PORT_3306_TCP" ] && [ -z "$REDMINE_DB_MYSQL" ]; then
 				export REDMINE_DB_MYSQL='mysql'
@@ -51,9 +52,17 @@ case "$1" in
 				file_env 'REDMINE_DB_PASSWORD' "${POSTGRES_ENV_POSTGRES_PASSWORD}"
 				file_env 'REDMINE_DB_DATABASE' "${POSTGRES_ENV_POSTGRES_DB:-${REDMINE_DB_USERNAME:-}}"
 				file_env 'REDMINE_DB_ENCODING' 'utf8'
+			elif [ "$REDMINE_DB_SQLSERVER" ]; then
+				adapter='sqlserver'
+				host="$REDMINE_DB_SQLSERVER"
+				file_env 'REDMINE_DB_PORT' '1433'
+				file_env 'REDMINE_DB_USERNAME' ''
+				file_env 'REDMINE_DB_PASSWORD' ''
+				file_env 'REDMINE_DB_DATABASE' ''
+				file_env 'REDMINE_DB_ENCODING' ''
 			else
 				echo >&2
-				echo >&2 'warning: missing REDMINE_DB_MYSQL or REDMINE_DB_POSTGRES environment variables'
+				echo >&2 'warning: missing REDMINE_DB_MYSQL, REDMINE_DB_POSTGRES, or REDMINE_DB_SQLSERVER environment variables'
 				echo >&2
 				echo >&2 '*** Using sqlite3 as fallback. ***'
 				echo >&2
diff --git a/rocket.chat_latest/Dockerfile b/rocket.chat_latest/Dockerfile
index 1d021ae..72a3abe 100644
--- a/rocket.chat_latest/Dockerfile
+++ b/rocket.chat_latest/Dockerfile
@@ -13,7 +13,7 @@ VOLUME /app/uploads
 # gpg: key 4FD08014: public key "Rocket.Chat Buildmaster <buildmaster@rocket.chat>" imported
 RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 0E163286C20D07B9787EBE9FD7F9D0414FD08104
 
-ENV RC_VERSION 0.60.2
+ENV RC_VERSION 0.60.3
 
 WORKDIR /app
 
diff --git a/wordpress_php5.6-fpm/Dockerfile b/wordpress_php5.6-fpm/Dockerfile
index 0f4e89c..182b1cc 100644
--- a/wordpress_php5.6-fpm/Dockerfile
+++ b/wordpress_php5.6-fpm/Dockerfile
@@ -2,17 +2,31 @@ FROM php:5.6-fpm
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php5.6/Dockerfile b/wordpress_php5.6/Dockerfile
index 5abb3fd..5ff9e01 100644
--- a/wordpress_php5.6/Dockerfile
+++ b/wordpress_php5.6/Dockerfile
@@ -2,17 +2,31 @@ FROM php:5.6-apache
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php7.0-fpm/Dockerfile b/wordpress_php7.0-fpm/Dockerfile
index 5001e76..eabe7e1 100644
--- a/wordpress_php7.0-fpm/Dockerfile
+++ b/wordpress_php7.0-fpm/Dockerfile
@@ -2,17 +2,31 @@ FROM php:7.0-fpm
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php7.0/Dockerfile b/wordpress_php7.0/Dockerfile
index 13f3624..5dffd47 100644
--- a/wordpress_php7.0/Dockerfile
+++ b/wordpress_php7.0/Dockerfile
@@ -2,17 +2,31 @@ FROM php:7.0-apache
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php7.1-fpm/Dockerfile b/wordpress_php7.1-fpm/Dockerfile
index 74f3d84..a9e2678 100644
--- a/wordpress_php7.1-fpm/Dockerfile
+++ b/wordpress_php7.1-fpm/Dockerfile
@@ -2,17 +2,31 @@ FROM php:7.1-fpm
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php7.1/Dockerfile b/wordpress_php7.1/Dockerfile
index dc23915..3a75f2f 100644
--- a/wordpress_php7.1/Dockerfile
+++ b/wordpress_php7.1/Dockerfile
@@ -2,17 +2,31 @@ FROM php:7.1-apache
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php7.2-fpm/Dockerfile b/wordpress_php7.2-fpm/Dockerfile
index 1115254..89d27e0 100644
--- a/wordpress_php7.2-fpm/Dockerfile
+++ b/wordpress_php7.2-fpm/Dockerfile
@@ -2,17 +2,31 @@ FROM php:7.2-fpm
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
diff --git a/wordpress_php7.2/Dockerfile b/wordpress_php7.2/Dockerfile
index 6c9b089..904b897 100644
--- a/wordpress_php7.2/Dockerfile
+++ b/wordpress_php7.2/Dockerfile
@@ -2,17 +2,31 @@ FROM php:7.2-apache
 
 # install the PHP extensions we need
 RUN set -ex; \
+	\
+	savedAptMark="$(apt-mark showmanual)"; \
 	\
 	apt-get update; \
-	apt-get install -y \
+	apt-get install -y --no-install-recommends \
 		libjpeg-dev \
 		libpng-dev \
 	; \
-	rm -rf /var/lib/apt/lists/*; \
 	\
 	docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
-	docker-php-ext-install gd mysqli opcache
-# TODO consider removing the *-dev deps and only keeping the necessary lib* packages
+	docker-php-ext-install gd mysqli opcache; \
+	\
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+	apt-mark auto '.*' > /dev/null; \
+	apt-mark manual $savedAptMark; \
+	ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+		| awk '/=>/ { print $3 }' \
+		| sort -u \
+		| xargs -r dpkg-query -S \
+		| cut -d: -f1 \
+		| sort -u \
+		| xargs -rt apt-mark manual; \
+	\
+	apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+	rm -rf /var/lib/apt/lists/*
 
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php

@tianon
Copy link
Member Author

tianon commented Jan 3, 2018

Build test of #3864; 38b2ec4; amd64 (cassandra, ghost, haproxy, php, redmine, rocket.chat, wordpress, nextcloud):

$ bashbrew build cassandra:2.1.19
Building bashbrew/cache:bdf05632bd8169086c90027271dd76aa3628f0ae27c190d1c595295b9a5f2cb2 (cassandra:2.1.19)
Tagging cassandra:2.1.19
Tagging cassandra:2.1

$ test/run.sh cassandra:2.1.19
testing cassandra:2.1.19
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'cassandra-basics' [5/5].......passed


$ bashbrew build cassandra:2.2.11
Building bashbrew/cache:19854cac019bd91db8120ec3528f03fb6622194f689c0bc1570589ead8e10cf0 (cassandra:2.2.11)
Tagging cassandra:2.2.11
Tagging cassandra:2.2
Tagging cassandra:2

$ test/run.sh cassandra:2.2.11
testing cassandra:2.2.11
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'cassandra-basics' [5/5].......passed


$ bashbrew build cassandra:3.0.15
Building bashbrew/cache:5930c6b1a4a7a7b1415fd1f0431d91dbd537e7d5fb14a850c57d159c6b53f331 (cassandra:3.0.15)
Tagging cassandra:3.0.15
Tagging cassandra:3.0

$ test/run.sh cassandra:3.0.15
testing cassandra:3.0.15
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'cassandra-basics' [5/5].......passed


$ bashbrew build cassandra:3.11.1
Building bashbrew/cache:fa3cbca81ceee7a1f6a82c87dc4119bf3891ab367e817bbef8800f238012a840 (cassandra:3.11.1)
Tagging cassandra:3.11.1
Tagging cassandra:3.11
Tagging cassandra:3
Tagging cassandra:latest

$ test/run.sh cassandra:3.11.1
testing cassandra:3.11.1
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'cassandra-basics' [5/5].......passed
$ bashbrew build ghost:1.19.1
Building bashbrew/cache:f215296c631b1995e924209f1a781d05870b063967394fcf7d95278f7725918f (ghost:1.19.1)
Tagging ghost:1.19.1
Tagging ghost:1.19
Tagging ghost:1
Tagging ghost:latest

$ test/run.sh ghost:1.19.1
testing ghost:1.19.1
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'ghost-basics' [5/5].....passed


$ bashbrew build ghost:1.19.1-alpine
Building bashbrew/cache:08e696a561f7d1707cb2d3314f4522e57f953b009e47514c202031d120d18e1c (ghost:1.19.1-alpine)
Tagging ghost:1.19.1-alpine
Tagging ghost:1.19-alpine
Tagging ghost:1-alpine
Tagging ghost:alpine

$ test/run.sh ghost:1.19.1-alpine
testing ghost:1.19.1-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'ghost-basics' [5/5].....passed


$ bashbrew build ghost:0.11.12
Building bashbrew/cache:06a353c984b9b21c857bac6cafa509046ac44bd1e0054d6db38bf052bdd0735e (ghost:0.11.12)
Tagging ghost:0.11.12
Tagging ghost:0.11
Tagging ghost:0

$ test/run.sh ghost:0.11.12
testing ghost:0.11.12
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'ghost-basics' [5/5]....passed


$ bashbrew build ghost:0.11.12-alpine
Building bashbrew/cache:a2e3a4f29da762790fef65de50b39d590d9a992388ca1293bfe4b6254ae6f5f7 (ghost:0.11.12-alpine)
Tagging ghost:0.11.12-alpine
Tagging ghost:0.11-alpine
Tagging ghost:0-alpine

$ test/run.sh ghost:0.11.12-alpine
testing ghost:0.11.12-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'ghost-basics' [5/5]....passed
$ bashbrew build haproxy:1.4.27
Using bashbrew/cache:e2b39a607334d43c4a04e988e24e37cd21898b3498b464bc9bb2757692a8253e (haproxy:1.4.27)
Tagging haproxy:1.4.27
Tagging haproxy:1.4

$ test/run.sh haproxy:1.4.27
testing haproxy:1.4.27
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.4.27-alpine
Using bashbrew/cache:981fa6ab50c5ce4b4a5f386b4d8811ee827e78189952b6b8046c5e3a68f54fb9 (haproxy:1.4.27-alpine)
Tagging haproxy:1.4.27-alpine
Tagging haproxy:1.4-alpine

$ test/run.sh haproxy:1.4.27-alpine
testing haproxy:1.4.27-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.5.19
Using bashbrew/cache:eade4a9993f513ee74568f0c3fc23dd4991a0d0f80f3d297cafa6a60a6604212 (haproxy:1.5.19)
Tagging haproxy:1.5.19
Tagging haproxy:1.5

$ test/run.sh haproxy:1.5.19
testing haproxy:1.5.19
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.5.19-alpine
Using bashbrew/cache:afd10cfd58e50fa850c6d6cee6ead266947d782458ade4555d7a6801e99d44c6 (haproxy:1.5.19-alpine)
Tagging haproxy:1.5.19-alpine
Tagging haproxy:1.5-alpine

$ test/run.sh haproxy:1.5.19-alpine
testing haproxy:1.5.19-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.6.14
Building bashbrew/cache:95f707ad4dc85df217532592d78f1fe8312e267cbf4da0405016db2ba647954f (haproxy:1.6.14)
Tagging haproxy:1.6.14
Tagging haproxy:1.6

$ test/run.sh haproxy:1.6.14
testing haproxy:1.6.14
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.6.14-alpine
Building bashbrew/cache:72e532d6c889405df9a99ccd0450f444e36a0a7763a19f5a08146bea7d02ce54 (haproxy:1.6.14-alpine)
Tagging haproxy:1.6.14-alpine
Tagging haproxy:1.6-alpine

$ test/run.sh haproxy:1.6.14-alpine
testing haproxy:1.6.14-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.7.10
Building bashbrew/cache:0880b717dbad0c47462bad5cc08ea2a00843e41b45cd5e973da7b287d4f45caf (haproxy:1.7.10)
Tagging haproxy:1.7.10
Tagging haproxy:1.7

$ test/run.sh haproxy:1.7.10
testing haproxy:1.7.10
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.7.10-alpine
Building bashbrew/cache:368a65d7fa1c9696a017565b6fe5040b70773d677c0847b132485f1d21cdf6fa (haproxy:1.7.10-alpine)
Tagging haproxy:1.7.10-alpine
Tagging haproxy:1.7-alpine

$ test/run.sh haproxy:1.7.10-alpine
testing haproxy:1.7.10-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.8.3
Using bashbrew/cache:9e84c8c51b7f1f8882858c8eeedd045b2f419983577a3229e64f1ea28ea06069 (haproxy:1.8.3)
Tagging haproxy:1.8.3
Tagging haproxy:1.8
Tagging haproxy:1
Tagging haproxy:latest

$ test/run.sh haproxy:1.8.3
testing haproxy:1.8.3
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed


$ bashbrew build haproxy:1.8.3-alpine
Using bashbrew/cache:ea523229dfcd638ee3b76349d1e0474081788a59f298bb4516c4ac90f5e13388 (haproxy:1.8.3-alpine)
Tagging haproxy:1.8.3-alpine
Tagging haproxy:1.8-alpine
Tagging haproxy:1-alpine
Tagging haproxy:alpine

$ test/run.sh haproxy:1.8.3-alpine
testing haproxy:1.8.3-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'haproxy-basics' [5/5]...passed
$ bashbrew build php:7.2.0-cli-stretch
Building bashbrew/cache:b1013202f680b05b1a28a542a60b0a7c60ce111672e07c142bcd1d2c2b0cc644 (php:7.2.0-cli-stretch)
Tagging php:7.2.0-cli-stretch
Tagging php:7.2-cli-stretch
Tagging php:7-cli-stretch
Tagging php:cli-stretch
Tagging php:7.2.0-stretch
Tagging php:7.2-stretch
Tagging php:7-stretch
Tagging php:stretch
Tagging php:7.2.0-cli
Tagging php:7.2-cli
Tagging php:7-cli
Tagging php:cli
Tagging php:7.2.0
Tagging php:7.2
Tagging php:7
Tagging php:latest

$ test/run.sh php:7.2.0-cli-stretch
testing php:7.2.0-cli-stretch
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.2.0-apache-stretch
Building bashbrew/cache:c72f34bd15c44100a05048604e27c7f03672653429fa1fb32d4b9384f45a9cd0 (php:7.2.0-apache-stretch)
Tagging php:7.2.0-apache-stretch
Tagging php:7.2-apache-stretch
Tagging php:7-apache-stretch
Tagging php:apache-stretch
Tagging php:7.2.0-apache
Tagging php:7.2-apache
Tagging php:7-apache
Tagging php:apache

$ test/run.sh php:7.2.0-apache-stretch
testing php:7.2.0-apache-stretch
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.2.0-fpm-stretch
Building bashbrew/cache:33d2a4dbbfcff75a36f61c9e6356f6f92225e37c5040b356d5b340866a8aaf27 (php:7.2.0-fpm-stretch)
Tagging php:7.2.0-fpm-stretch
Tagging php:7.2-fpm-stretch
Tagging php:7-fpm-stretch
Tagging php:fpm-stretch
Tagging php:7.2.0-fpm
Tagging php:7.2-fpm
Tagging php:7-fpm
Tagging php:fpm

$ test/run.sh php:7.2.0-fpm-stretch
testing php:7.2.0-fpm-stretch
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.2.0-zts-stretch
Building bashbrew/cache:a8255e0446a1890c96c4cadc65f5ab2d70065d28e8cd25446f123fd959131df2 (php:7.2.0-zts-stretch)
Tagging php:7.2.0-zts-stretch
Tagging php:7.2-zts-stretch
Tagging php:7-zts-stretch
Tagging php:zts-stretch
Tagging php:7.2.0-zts
Tagging php:7.2-zts
Tagging php:7-zts
Tagging php:zts

$ test/run.sh php:7.2.0-zts-stretch
testing php:7.2.0-zts-stretch
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.2.0-cli-alpine3.7
Building bashbrew/cache:860693e094e1e0d4dcbd97323cb4c9ef4b1c056b0dd5b2c6c4b006f2d9b21942 (php:7.2.0-cli-alpine3.7)
Tagging php:7.2.0-cli-alpine3.7
Tagging php:7.2-cli-alpine3.7
Tagging php:7-cli-alpine3.7
Tagging php:cli-alpine3.7
Tagging php:7.2.0-alpine3.7
Tagging php:7.2-alpine3.7
Tagging php:7-alpine3.7
Tagging php:alpine3.7

$ test/run.sh php:7.2.0-cli-alpine3.7
testing php:7.2.0-cli-alpine3.7
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.2.0-fpm-alpine3.7
Building bashbrew/cache:0e0be27ba0b00de47f5f363a3b9797764fcbffc168b95d97b09351fcf4791d3c (php:7.2.0-fpm-alpine3.7)
Tagging php:7.2.0-fpm-alpine3.7
Tagging php:7.2-fpm-alpine3.7
Tagging php:7-fpm-alpine3.7
Tagging php:fpm-alpine3.7

$ test/run.sh php:7.2.0-fpm-alpine3.7
testing php:7.2.0-fpm-alpine3.7
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.2.0-zts-alpine3.7
Building bashbrew/cache:9960daba0fce9d3c499a1ee71317af1316a7c173e4e4dd0814fa24dcee759dae (php:7.2.0-zts-alpine3.7)
Tagging php:7.2.0-zts-alpine3.7
Tagging php:7.2-zts-alpine3.7
Tagging php:7-zts-alpine3.7
Tagging php:zts-alpine3.7

$ test/run.sh php:7.2.0-zts-alpine3.7
testing php:7.2.0-zts-alpine3.7
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.2.0-cli-alpine3.6
Building bashbrew/cache:83a17981492d6bee1e6f79c621b8159331237014444cea1e54edb287995684cd (php:7.2.0-cli-alpine3.6)
Tagging php:7.2.0-cli-alpine3.6
Tagging php:7.2-cli-alpine3.6
Tagging php:7-cli-alpine3.6
Tagging php:cli-alpine3.6
Tagging php:7.2.0-alpine3.6
Tagging php:7.2-alpine3.6
Tagging php:7-alpine3.6
Tagging php:alpine3.6
Tagging php:7.2.0-cli-alpine
Tagging php:7.2-cli-alpine
Tagging php:7-cli-alpine
Tagging php:cli-alpine
Tagging php:7.2.0-alpine
Tagging php:7.2-alpine
Tagging php:7-alpine
Tagging php:alpine

$ test/run.sh php:7.2.0-cli-alpine3.6
testing php:7.2.0-cli-alpine3.6
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.2.0-fpm-alpine3.6
Building bashbrew/cache:5e2199ecea7b1b10e2a955e280a4f87a66592c12500c2b771cbd3e0c8f0e786d (php:7.2.0-fpm-alpine3.6)
Tagging php:7.2.0-fpm-alpine3.6
Tagging php:7.2-fpm-alpine3.6
Tagging php:7-fpm-alpine3.6
Tagging php:fpm-alpine3.6
Tagging php:7.2.0-fpm-alpine
Tagging php:7.2-fpm-alpine
Tagging php:7-fpm-alpine
Tagging php:fpm-alpine

$ test/run.sh php:7.2.0-fpm-alpine3.6
testing php:7.2.0-fpm-alpine3.6
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.2.0-zts-alpine3.6
Building bashbrew/cache:3a717324045fb0c9099901989c7fab6521588f2da19a307044509b8258cabc75 (php:7.2.0-zts-alpine3.6)
Tagging php:7.2.0-zts-alpine3.6
Tagging php:7.2-zts-alpine3.6
Tagging php:7-zts-alpine3.6
Tagging php:zts-alpine3.6
Tagging php:7.2.0-zts-alpine
Tagging php:7.2-zts-alpine
Tagging php:7-zts-alpine
Tagging php:zts-alpine

$ test/run.sh php:7.2.0-zts-alpine3.6
testing php:7.2.0-zts-alpine3.6
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.1.12-cli-jessie
Building bashbrew/cache:f8147b43748a6627c1e6dcb5c2351194aae319a9c2beaae8b33206c03a37c658 (php:7.1.12-cli-jessie)
Tagging php:7.1.12-cli-jessie
Tagging php:7.1-cli-jessie
Tagging php:7.1.12-jessie
Tagging php:7.1-jessie
Tagging php:7.1.12-cli
Tagging php:7.1-cli
Tagging php:7.1.12
Tagging php:7.1

$ test/run.sh php:7.1.12-cli-jessie
testing php:7.1.12-cli-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.1.12-apache-jessie
Building bashbrew/cache:7bad16b0c0a72347f4729ff6314b99f9084e19bdc192e32c6e30d7220fbbfaf3 (php:7.1.12-apache-jessie)
Tagging php:7.1.12-apache-jessie
Tagging php:7.1-apache-jessie
Tagging php:7.1.12-apache
Tagging php:7.1-apache

$ test/run.sh php:7.1.12-apache-jessie
testing php:7.1.12-apache-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.1.12-fpm-jessie
Building bashbrew/cache:d9019ceb116069cc15f8348798910489fdd2583422f962b9138eb614dc0d6650 (php:7.1.12-fpm-jessie)
Tagging php:7.1.12-fpm-jessie
Tagging php:7.1-fpm-jessie
Tagging php:7.1.12-fpm
Tagging php:7.1-fpm

$ test/run.sh php:7.1.12-fpm-jessie
testing php:7.1.12-fpm-jessie
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.1.12-zts-jessie
Building bashbrew/cache:e0fa2735a8ef83666a3a04430f73c89d7998515395978b6baaf4d1468699ad31 (php:7.1.12-zts-jessie)
Tagging php:7.1.12-zts-jessie
Tagging php:7.1-zts-jessie
Tagging php:7.1.12-zts
Tagging php:7.1-zts

$ test/run.sh php:7.1.12-zts-jessie
testing php:7.1.12-zts-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.1.12-cli-alpine3.4
Building bashbrew/cache:05c3c9c4a48596003f87735f1b089defafe61f937858a13b7a7a1f03e675535e (php:7.1.12-cli-alpine3.4)
Tagging php:7.1.12-cli-alpine3.4
Tagging php:7.1-cli-alpine3.4
Tagging php:7.1.12-alpine3.4
Tagging php:7.1-alpine3.4
Tagging php:7.1.12-cli-alpine
Tagging php:7.1-cli-alpine
Tagging php:7.1.12-alpine
Tagging php:7.1-alpine

$ test/run.sh php:7.1.12-cli-alpine3.4
testing php:7.1.12-cli-alpine3.4
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.1.12-fpm-alpine3.4
Building bashbrew/cache:bfcf16f043da2be8eb3fe8b4fb980fe0cd7cedbed9c4b64ca8c6525ca9506d78 (php:7.1.12-fpm-alpine3.4)
Tagging php:7.1.12-fpm-alpine3.4
Tagging php:7.1-fpm-alpine3.4
Tagging php:7.1.12-fpm-alpine
Tagging php:7.1-fpm-alpine

$ test/run.sh php:7.1.12-fpm-alpine3.4
testing php:7.1.12-fpm-alpine3.4
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.1.12-zts-alpine3.4
Building bashbrew/cache:d78df7a0ca89eabb335bdd5ebb4848285fc3f82a094f49d4a5696982458f8ec8 (php:7.1.12-zts-alpine3.4)
Tagging php:7.1.12-zts-alpine3.4
Tagging php:7.1-zts-alpine3.4
Tagging php:7.1.12-zts-alpine
Tagging php:7.1-zts-alpine

$ test/run.sh php:7.1.12-zts-alpine3.4
testing php:7.1.12-zts-alpine3.4
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.0.26-cli-jessie
Building bashbrew/cache:47ce4740521e9bf83c0440fe9217d924e7e8a9ec98a446d9c0c5ca589520abf5 (php:7.0.26-cli-jessie)
Tagging php:7.0.26-cli-jessie
Tagging php:7.0-cli-jessie
Tagging php:7.0.26-jessie
Tagging php:7.0-jessie
Tagging php:7.0.26-cli
Tagging php:7.0-cli
Tagging php:7.0.26
Tagging php:7.0

$ test/run.sh php:7.0.26-cli-jessie
testing php:7.0.26-cli-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.0.26-apache-jessie
Building bashbrew/cache:0f399f80bb231c22d2848465e1fb119f128e20bd39339da1990d6fd449a3bc80 (php:7.0.26-apache-jessie)
Tagging php:7.0.26-apache-jessie
Tagging php:7.0-apache-jessie
Tagging php:7.0.26-apache
Tagging php:7.0-apache

$ test/run.sh php:7.0.26-apache-jessie
testing php:7.0.26-apache-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.0.26-fpm-jessie
Building bashbrew/cache:c1a4943ae467133b388d8b00eeff426036b95715596806a71c94dc133ddc1d1a (php:7.0.26-fpm-jessie)
Tagging php:7.0.26-fpm-jessie
Tagging php:7.0-fpm-jessie
Tagging php:7.0.26-fpm
Tagging php:7.0-fpm

$ test/run.sh php:7.0.26-fpm-jessie
testing php:7.0.26-fpm-jessie
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.0.26-zts-jessie
Building bashbrew/cache:33e4362ea4cfb9d757131c82fe10f0f7b4df90f0ab0a259cb982666c865e45c9 (php:7.0.26-zts-jessie)
Tagging php:7.0.26-zts-jessie
Tagging php:7.0-zts-jessie
Tagging php:7.0.26-zts
Tagging php:7.0-zts

$ test/run.sh php:7.0.26-zts-jessie
testing php:7.0.26-zts-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.0.26-cli-alpine3.4
Building bashbrew/cache:5ad335f46fac056cce25ad199f5766b868cbd8173768b16cada9c245714dc6e5 (php:7.0.26-cli-alpine3.4)
Tagging php:7.0.26-cli-alpine3.4
Tagging php:7.0-cli-alpine3.4
Tagging php:7.0.26-alpine3.4
Tagging php:7.0-alpine3.4
Tagging php:7.0.26-cli-alpine
Tagging php:7.0-cli-alpine
Tagging php:7.0.26-alpine
Tagging php:7.0-alpine

$ test/run.sh php:7.0.26-cli-alpine3.4
testing php:7.0.26-cli-alpine3.4
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:7.0.26-fpm-alpine3.4
Building bashbrew/cache:b24f09e98613ec113c6ba708e1ed4f37eedc8b2766f392a1b7be83586f366cb2 (php:7.0.26-fpm-alpine3.4)
Tagging php:7.0.26-fpm-alpine3.4
Tagging php:7.0-fpm-alpine3.4
Tagging php:7.0.26-fpm-alpine
Tagging php:7.0-fpm-alpine

$ test/run.sh php:7.0.26-fpm-alpine3.4
testing php:7.0.26-fpm-alpine3.4
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:7.0.26-zts-alpine3.4
Building bashbrew/cache:f0fe60959cd259d33fffea4880c06aff382bf96feac021fa8270106423110f73 (php:7.0.26-zts-alpine3.4)
Tagging php:7.0.26-zts-alpine3.4
Tagging php:7.0-zts-alpine3.4
Tagging php:7.0.26-zts-alpine
Tagging php:7.0-zts-alpine

$ test/run.sh php:7.0.26-zts-alpine3.4
testing php:7.0.26-zts-alpine3.4
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:5.6.32-cli-jessie
Building bashbrew/cache:a11ea56f40b023a438d5f1609fd743be19af0b7e4fa5741f36a98ec7c9078a77 (php:5.6.32-cli-jessie)
Tagging php:5.6.32-cli-jessie
Tagging php:5.6-cli-jessie
Tagging php:5-cli-jessie
Tagging php:5.6.32-jessie
Tagging php:5.6-jessie
Tagging php:5-jessie
Tagging php:5.6.32-cli
Tagging php:5.6-cli
Tagging php:5-cli
Tagging php:5.6.32
Tagging php:5.6
Tagging php:5

$ test/run.sh php:5.6.32-cli-jessie
testing php:5.6.32-cli-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:5.6.32-apache-jessie
Building bashbrew/cache:704290c7ee9c47d624010ecd3e0d5d26a79c5abb25361648cb8762911c3fef5c (php:5.6.32-apache-jessie)
Tagging php:5.6.32-apache-jessie
Tagging php:5.6-apache-jessie
Tagging php:5-apache-jessie
Tagging php:5.6.32-apache
Tagging php:5.6-apache
Tagging php:5-apache

$ test/run.sh php:5.6.32-apache-jessie
testing php:5.6.32-apache-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:5.6.32-fpm-jessie
Building bashbrew/cache:d6c5de71baac6b19469e6fbea7a1130c2ed3dbbd16cca45779b5b4c5a32fde69 (php:5.6.32-fpm-jessie)
Tagging php:5.6.32-fpm-jessie
Tagging php:5.6-fpm-jessie
Tagging php:5-fpm-jessie
Tagging php:5.6.32-fpm
Tagging php:5.6-fpm
Tagging php:5-fpm

$ test/run.sh php:5.6.32-fpm-jessie
testing php:5.6.32-fpm-jessie
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:5.6.32-zts-jessie
Building bashbrew/cache:64a1d646745d2b5d580fa773a1585e34060e125f68816655255bdc42584471da (php:5.6.32-zts-jessie)
Tagging php:5.6.32-zts-jessie
Tagging php:5.6-zts-jessie
Tagging php:5-zts-jessie
Tagging php:5.6.32-zts
Tagging php:5.6-zts
Tagging php:5-zts

$ test/run.sh php:5.6.32-zts-jessie
testing php:5.6.32-zts-jessie
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:5.6.32-cli-alpine3.4
Building bashbrew/cache:68dbf2db816b96fc124f3559f19f346836e7ef54fc5b8ed860035c2a6079ae99 (php:5.6.32-cli-alpine3.4)
Tagging php:5.6.32-cli-alpine3.4
Tagging php:5.6-cli-alpine3.4
Tagging php:5-cli-alpine3.4
Tagging php:5.6.32-alpine3.4
Tagging php:5.6-alpine3.4
Tagging php:5-alpine3.4
Tagging php:5.6.32-cli-alpine
Tagging php:5.6-cli-alpine
Tagging php:5-cli-alpine
Tagging php:5.6.32-alpine
Tagging php:5.6-alpine
Tagging php:5-alpine

$ test/run.sh php:5.6.32-cli-alpine3.4
testing php:5.6.32-cli-alpine3.4
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed


$ bashbrew build php:5.6.32-fpm-alpine3.4
Building bashbrew/cache:d351d23c6c74f4a098542c6173166c1ea39f02f09320e9c18f6878fb79d05d23 (php:5.6.32-fpm-alpine3.4)
Tagging php:5.6.32-fpm-alpine3.4
Tagging php:5.6-fpm-alpine3.4
Tagging php:5-fpm-alpine3.4
Tagging php:5.6.32-fpm-alpine
Tagging php:5.6-fpm-alpine
Tagging php:5-fpm-alpine

$ test/run.sh php:5.6.32-fpm-alpine3.4
testing php:5.6.32-fpm-alpine3.4
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'php-ext-install' [5/7]...passed
	'php-hello-world' [6/7]...passed
	'php-fpm-hello-web' [7/7]...passed


$ bashbrew build php:5.6.32-zts-alpine3.4
Building bashbrew/cache:035dd1ea678bd8cf3f28d3bc79f3d908d51b345cb77cb503763efe33eca0457b (php:5.6.32-zts-alpine3.4)
Tagging php:5.6.32-zts-alpine3.4
Tagging php:5.6-zts-alpine3.4
Tagging php:5-zts-alpine3.4
Tagging php:5.6.32-zts-alpine
Tagging php:5.6-zts-alpine
Tagging php:5-zts-alpine

$ test/run.sh php:5.6.32-zts-alpine3.4
testing php:5.6.32-zts-alpine3.4
	'utc' [1/6]...passed
	'cve-2014--shellshock' [2/6]...passed
	'no-hard-coded-passwords' [3/6]...passed
	'override-cmd' [4/6]...passed
	'php-ext-install' [5/6]...passed
	'php-hello-world' [6/6]...passed
$ bashbrew build redmine:3.4.3
Building bashbrew/cache:90f02e81d5ee940fc454980d4dd5ba548ef63fce0852c75598b8e1269056745f (redmine:3.4.3)
Tagging redmine:3.4.3
Tagging redmine:3.4
Tagging redmine:3
Tagging redmine:latest

$ test/run.sh redmine:3.4.3
testing redmine:3.4.3
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5]......passed


$ bashbrew build redmine:3.4.3-passenger
Building bashbrew/cache:8d594e495b9b361832304e728b82b82bdb841b6966bfcf7f80d3388dd2b4a7d2 (redmine:3.4.3-passenger)
Tagging redmine:3.4.3-passenger
Tagging redmine:3.4-passenger
Tagging redmine:3-passenger
Tagging redmine:passenger

$ test/run.sh redmine:3.4.3-passenger
testing redmine:3.4.3-passenger
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5]......passed


$ bashbrew build redmine:3.3.5
Building bashbrew/cache:dcef5964cf4d6b595909ae998f3d788c3cea9e6da92f4adf96751a9267ab9f72 (redmine:3.3.5)
Tagging redmine:3.3.5
Tagging redmine:3.3

$ test/run.sh redmine:3.3.5
testing redmine:3.3.5
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5]......passed


$ bashbrew build redmine:3.3.5-passenger
Building bashbrew/cache:4e17bc322f7fe532ab5311fe70988df05ddfbeb7cad9ff30600c21d21b6b88d5 (redmine:3.3.5-passenger)
Tagging redmine:3.3.5-passenger
Tagging redmine:3.3-passenger

$ test/run.sh redmine:3.3.5-passenger
testing redmine:3.3.5-passenger
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5]......passed


$ bashbrew build redmine:3.2.8
Building bashbrew/cache:91f5aaceab43447bc2c34497b8ad0c099f73465afea4ef712703101222a980a4 (redmine:3.2.8)
Tagging redmine:3.2.8
Tagging redmine:3.2

$ test/run.sh redmine:3.2.8
testing redmine:3.2.8
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5]......passed


$ bashbrew build redmine:3.2.8-passenger
Building bashbrew/cache:825c2e4250daa904bf4a3f7c8d7271e30dfb2194b623038bdc22220e96df33ad (redmine:3.2.8-passenger)
Tagging redmine:3.2.8-passenger
Tagging redmine:3.2-passenger

$ test/run.sh redmine:3.2.8-passenger
testing redmine:3.2.8-passenger
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'redmine-basics' [5/5]......passed
$ bashbrew build rocket.chat:0.60.3
Building bashbrew/cache:d542f34b23761e63c83e907499b8a7e27a1bdfa5358fb9b8d137b8e790cbe62c (rocket.chat:0.60.3)
Tagging rocket.chat:0.60.3
Tagging rocket.chat:0.60
Tagging rocket.chat:0
Tagging rocket.chat:latest

$ test/run.sh rocket.chat:0.60.3
testing rocket.chat:0.60.3
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed
$ bashbrew build wordpress:4.9.1-php5.6-apache
Building bashbrew/cache:872737b06801c55a6fdfc0619e6e7723fc7be365ee2d089b78dae92721e7e47b (wordpress:4.9.1-php5.6-apache)
Tagging wordpress:4.9.1-php5.6-apache
Tagging wordpress:4.9-php5.6-apache
Tagging wordpress:4-php5.6-apache
Tagging wordpress:php5.6-apache
Tagging wordpress:4.9.1-php5.6
Tagging wordpress:4.9-php5.6
Tagging wordpress:4-php5.6
Tagging wordpress:php5.6

$ test/run.sh wordpress:4.9.1-php5.6-apache
testing wordpress:4.9.1-php5.6-apache
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-apache-run' [5/5].......passed


$ bashbrew build wordpress:4.9.1-php5.6-fpm
Building bashbrew/cache:644b19cbd9e5b29901b3a10ce014a9e094fe499e23dca5b2fcb3c22e84476850 (wordpress:4.9.1-php5.6-fpm)
Tagging wordpress:4.9.1-php5.6-fpm
Tagging wordpress:4.9-php5.6-fpm
Tagging wordpress:4-php5.6-fpm
Tagging wordpress:php5.6-fpm

$ test/run.sh wordpress:4.9.1-php5.6-fpm
testing wordpress:4.9.1-php5.6-fpm
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php5.6-fpm-alpine
Building bashbrew/cache:197f3cba119924bc5068a4ec043bb4cccf45f5c22697d323894ec0a9cc30317b (wordpress:4.9.1-php5.6-fpm-alpine)
Tagging wordpress:4.9.1-php5.6-fpm-alpine
Tagging wordpress:4.9-php5.6-fpm-alpine
Tagging wordpress:4-php5.6-fpm-alpine
Tagging wordpress:php5.6-fpm-alpine

$ test/run.sh wordpress:4.9.1-php5.6-fpm-alpine
testing wordpress:4.9.1-php5.6-fpm-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php7.0-apache
Building bashbrew/cache:8c16ed1a3745049c28b39c0017c7d3c790b476b7ad08f9f2d134084007438cce (wordpress:4.9.1-php7.0-apache)
Tagging wordpress:4.9.1-php7.0-apache
Tagging wordpress:4.9-php7.0-apache
Tagging wordpress:4-php7.0-apache
Tagging wordpress:php7.0-apache
Tagging wordpress:4.9.1-php7.0
Tagging wordpress:4.9-php7.0
Tagging wordpress:4-php7.0
Tagging wordpress:php7.0

$ test/run.sh wordpress:4.9.1-php7.0-apache
testing wordpress:4.9.1-php7.0-apache
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-apache-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php7.0-fpm
Building bashbrew/cache:07e5d2e7248a8a2b31c372b4a3b4d817fbb344c3d3f5cfba30a5dce50de43cd5 (wordpress:4.9.1-php7.0-fpm)
Tagging wordpress:4.9.1-php7.0-fpm
Tagging wordpress:4.9-php7.0-fpm
Tagging wordpress:4-php7.0-fpm
Tagging wordpress:php7.0-fpm

$ test/run.sh wordpress:4.9.1-php7.0-fpm
testing wordpress:4.9.1-php7.0-fpm
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php7.0-fpm-alpine
Building bashbrew/cache:d8a6e970c60e4ded37c2234c7774915a996bfacf4422e6aa16bd86ed6dcc9c36 (wordpress:4.9.1-php7.0-fpm-alpine)
Tagging wordpress:4.9.1-php7.0-fpm-alpine
Tagging wordpress:4.9-php7.0-fpm-alpine
Tagging wordpress:4-php7.0-fpm-alpine
Tagging wordpress:php7.0-fpm-alpine

$ test/run.sh wordpress:4.9.1-php7.0-fpm-alpine
testing wordpress:4.9.1-php7.0-fpm-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php7.1-apache
Building bashbrew/cache:b36da576d24ca93e9ac885340cf9e68e47fc2b99d55482476111a4a869635740 (wordpress:4.9.1-php7.1-apache)
Tagging wordpress:4.9.1-php7.1-apache
Tagging wordpress:4.9-php7.1-apache
Tagging wordpress:4-php7.1-apache
Tagging wordpress:php7.1-apache
Tagging wordpress:4.9.1-php7.1
Tagging wordpress:4.9-php7.1
Tagging wordpress:4-php7.1
Tagging wordpress:php7.1

$ test/run.sh wordpress:4.9.1-php7.1-apache
testing wordpress:4.9.1-php7.1-apache
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-apache-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php7.1-fpm
Building bashbrew/cache:e9df4874c8584f3a9382bcc9e941c7a3692bfa7b7eef6361691a613f23ce4357 (wordpress:4.9.1-php7.1-fpm)
Tagging wordpress:4.9.1-php7.1-fpm
Tagging wordpress:4.9-php7.1-fpm
Tagging wordpress:4-php7.1-fpm
Tagging wordpress:php7.1-fpm

$ test/run.sh wordpress:4.9.1-php7.1-fpm
testing wordpress:4.9.1-php7.1-fpm
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-php7.1-fpm-alpine
Building bashbrew/cache:c43f400a0c137d47dcfd7cfe8f72d2c47e58d7fab1143d1e77351aeaef4a297c (wordpress:4.9.1-php7.1-fpm-alpine)
Tagging wordpress:4.9.1-php7.1-fpm-alpine
Tagging wordpress:4.9-php7.1-fpm-alpine
Tagging wordpress:4-php7.1-fpm-alpine
Tagging wordpress:php7.1-fpm-alpine

$ test/run.sh wordpress:4.9.1-php7.1-fpm-alpine
testing wordpress:4.9.1-php7.1-fpm-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-apache
Building bashbrew/cache:ea438359ec6adea773b8d815c074143856093969bc6d71576fa752e90af298c5 (wordpress:4.9.1-apache)
Tagging wordpress:4.9.1-apache
Tagging wordpress:4.9-apache
Tagging wordpress:4-apache
Tagging wordpress:apache
Tagging wordpress:4.9.1
Tagging wordpress:4.9
Tagging wordpress:4
Tagging wordpress:latest
Tagging wordpress:4.9.1-php7.2-apache
Tagging wordpress:4.9-php7.2-apache
Tagging wordpress:4-php7.2-apache
Tagging wordpress:php7.2-apache
Tagging wordpress:4.9.1-php7.2
Tagging wordpress:4.9-php7.2
Tagging wordpress:4-php7.2
Tagging wordpress:php7.2

$ test/run.sh wordpress:4.9.1-apache
testing wordpress:4.9.1-apache
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-apache-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-fpm
Building bashbrew/cache:f66c548e53040824dcb1fc54161e4b89626173cbb3d348289e418f1903fb20d2 (wordpress:4.9.1-fpm)
Tagging wordpress:4.9.1-fpm
Tagging wordpress:4.9-fpm
Tagging wordpress:4-fpm
Tagging wordpress:fpm
Tagging wordpress:4.9.1-php7.2-fpm
Tagging wordpress:4.9-php7.2-fpm
Tagging wordpress:4-php7.2-fpm
Tagging wordpress:php7.2-fpm

$ test/run.sh wordpress:4.9.1-fpm
testing wordpress:4.9.1-fpm
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:4.9.1-fpm-alpine
Building bashbrew/cache:158b9db1574afb32ad1a081f785fe269565916ca7cc3923f45a8638014fe189e (wordpress:4.9.1-fpm-alpine)
Tagging wordpress:4.9.1-fpm-alpine
Tagging wordpress:4.9-fpm-alpine
Tagging wordpress:4-fpm-alpine
Tagging wordpress:fpm-alpine
Tagging wordpress:4.9.1-php7.2-fpm-alpine
Tagging wordpress:4.9-php7.2-fpm-alpine
Tagging wordpress:4-php7.2-fpm-alpine
Tagging wordpress:php7.2-fpm-alpine

$ test/run.sh wordpress:4.9.1-fpm-alpine
testing wordpress:4.9.1-fpm-alpine
	'utc' [1/5]...passed
	'cve-2014--shellshock' [2/5]...passed
	'no-hard-coded-passwords' [3/5]...passed
	'override-cmd' [4/5]...passed
	'wordpress-fpm-run' [5/5]......passed


$ bashbrew build wordpress:cli-1.4.1-php5.6
Building bashbrew/cache:8334fe3b7799da36e592c5dc1c2023cc668f95ff5cf122bf09a18f12b02856c8 (wordpress:cli-1.4.1-php5.6)
Tagging wordpress:cli-1.4.1-php5.6
Tagging wordpress:cli-1.4-php5.6
Tagging wordpress:cli-1-php5.6
Tagging wordpress:cli-php5.6

$ test/run.sh wordpress:cli-1.4.1-php5.6
testing wordpress:cli-1.4.1-php5.6
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build wordpress:cli-1.4.1-php7.0
Building bashbrew/cache:f9edb5bacfbccd47543a09af1f11f34d5436231dd3e3fc8309082740a4426a51 (wordpress:cli-1.4.1-php7.0)
Tagging wordpress:cli-1.4.1-php7.0
Tagging wordpress:cli-1.4-php7.0
Tagging wordpress:cli-1-php7.0
Tagging wordpress:cli-php7.0

$ test/run.sh wordpress:cli-1.4.1-php7.0
testing wordpress:cli-1.4.1-php7.0
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build wordpress:cli-1.4.1-php7.1
Building bashbrew/cache:4d49def9ccf8dcb9fa6cc41a6a32cded1bc816d9c60c6e7e22b8fe5ed40429ba (wordpress:cli-1.4.1-php7.1)
Tagging wordpress:cli-1.4.1-php7.1
Tagging wordpress:cli-1.4-php7.1
Tagging wordpress:cli-1-php7.1
Tagging wordpress:cli-php7.1

$ test/run.sh wordpress:cli-1.4.1-php7.1
testing wordpress:cli-1.4.1-php7.1
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build wordpress:cli-1.4.1
Building bashbrew/cache:cd1529a7aa8d39429e68df0608541e220e87b6510a5c7f1280cc2ee33a168a81 (wordpress:cli-1.4.1)
Tagging wordpress:cli-1.4.1
Tagging wordpress:cli-1.4
Tagging wordpress:cli-1
Tagging wordpress:cli
Tagging wordpress:cli-1.4.1-php7.2
Tagging wordpress:cli-1.4-php7.2
Tagging wordpress:cli-1-php7.2
Tagging wordpress:cli-php7.2

$ test/run.sh wordpress:cli-1.4.1
testing wordpress:cli-1.4.1
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed
$ bashbrew build nextcloud:11.0.6-apache
Building bashbrew/cache:26c556a5de3eb9ad3bdddb76df2859e574d33df9cbf150b175e6a4bc995059e9 (nextcloud:11.0.6-apache)
Tagging nextcloud:11.0.6-apache
Tagging nextcloud:11.0-apache
Tagging nextcloud:11-apache
Tagging nextcloud:11.0.6
Tagging nextcloud:11.0
Tagging nextcloud:11

$ test/run.sh nextcloud:11.0.6-apache
testing nextcloud:11.0.6-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:11.0.6-fpm
Building bashbrew/cache:b5c3ca3290d344094820383cf5ae818050bf3ef1b4b6211ecc5973fc64b569ae (nextcloud:11.0.6-fpm)
Tagging nextcloud:11.0.6-fpm
Tagging nextcloud:11.0-fpm
Tagging nextcloud:11-fpm

$ test/run.sh nextcloud:11.0.6-fpm
testing nextcloud:11.0.6-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:12.0.4-apache
Building bashbrew/cache:4d909bf20239213e723c7715e99ead0d1ee03a3a9c47cc51ccd7bf23909cb657 (nextcloud:12.0.4-apache)
Tagging nextcloud:12.0.4-apache
Tagging nextcloud:12.0-apache
Tagging nextcloud:12-apache
Tagging nextcloud:apache
Tagging nextcloud:12.0.4
Tagging nextcloud:12.0
Tagging nextcloud:12
Tagging nextcloud:latest

$ test/run.sh nextcloud:12.0.4-apache
testing nextcloud:12.0.4-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:12.0.4-fpm
Building bashbrew/cache:a26a68c9713e18f519357071ec4a1c62a709ddde1d897b2acc0254363dfcd369 (nextcloud:12.0.4-fpm)
Tagging nextcloud:12.0.4-fpm
Tagging nextcloud:12.0-fpm
Tagging nextcloud:12-fpm
Tagging nextcloud:fpm

$ test/run.sh nextcloud:12.0.4-fpm
testing nextcloud:12.0.4-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed

@yosifkit yosifkit merged commit 66d7635 into docker-library:master Jan 3, 2018
@yosifkit yosifkit deleted the update-docker-library branch January 3, 2018 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants