From ea047e2587b3d60e2e70e02a652e4c1dc2dd821f Mon Sep 17 00:00:00 2001 From: Eric Pfeiffer Date: Sun, 28 Aug 2016 00:04:19 -0500 Subject: [PATCH 1/2] remove unnecessary env commands These environment variables are not needed since they are only being used at build time and we are already specifying them using the ARG command, no need to specify it twice since it increases build time and size. --- php-fpm/Dockerfile-70 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index fe412775..af39aa48 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt ##################################### ARG INSTALL_XDEBUG=true -ENV INSTALL_XDEBUG ${INSTALL_XDEBUG} RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Install the xdebug extension pecl install xdebug && \ @@ -56,7 +55,6 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini ##################################### ARG INSTALL_MONGO=true -ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension pecl install mongodb && \ @@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ##################################### ARG INSTALL_ZIP_ARCHIVE=true -ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE} RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ # Install the zip extension pecl install zip && \ @@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ ##################################### ARG INSTALL_MEMCACHED=true -ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED} RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Install the php memcached extension curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \ @@ -102,7 +98,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Opcache: ##################################### ARG INSTALL_OPCACHE=true -ENV INSTALL_OPCACHE ${INSTALL_OPCACHE} RUN if [ ${INSTALL_OPCACHE} = true ]; then \ docker-php-ext-install opcache && \ docker-php-ext-enable opcache \ From 314e43bb79374e50bd5fdd34ee8153c094740901 Mon Sep 17 00:00:00 2001 From: Eric Pfeiffer Date: Sun, 28 Aug 2016 00:04:52 -0500 Subject: [PATCH 2/2] Update Dockerfile-56 --- php-fpm/Dockerfile-56 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 60a67a28..ea390a1c 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt ##################################### ARG INSTALL_XDEBUG=true -ENV INSTALL_XDEBUG ${INSTALL_XDEBUG} RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Install the xdebug extension pecl install xdebug && \ @@ -56,7 +55,6 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini ##################################### ARG INSTALL_MONGO=true -ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension pecl install mongodb && \ @@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ##################################### ARG INSTALL_ZIP_ARCHIVE=true -ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE} RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ # Install the zip extension pecl install zip && \ @@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ ##################################### ARG INSTALL_MEMCACHED=true -ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED} RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Install the php memcached extension pecl install memcached && \ @@ -91,7 +87,6 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Opcache: ##################################### ARG INSTALL_OPCACHE=true -ENV INSTALL_OPCACHE ${INSTALL_OPCACHE} RUN if [ ${INSTALL_OPCACHE} = true ]; then \ docker-php-ext-install opcache && \ docker-php-ext-enable opcache \