Skip to content

Commit ea047e2

Browse files
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.
1 parent b252558 commit ea047e2

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

php-fpm/Dockerfile-70

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
4141
#####################################
4242

4343
ARG INSTALL_XDEBUG=true
44-
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
4544
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
4645
# Install the xdebug extension
4746
pecl install xdebug && \
@@ -56,7 +55,6 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
5655
#####################################
5756

5857
ARG INSTALL_MONGO=true
59-
ENV INSTALL_MONGO ${INSTALL_MONGO}
6058
RUN if [ ${INSTALL_MONGO} = true ]; then \
6159
# Install the mongodb extension
6260
pecl install mongodb && \
@@ -68,7 +66,6 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
6866
#####################################
6967

7068
ARG INSTALL_ZIP_ARCHIVE=true
71-
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
7269
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
7370
# Install the zip extension
7471
pecl install zip && \
@@ -80,7 +77,6 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
8077
#####################################
8178

8279
ARG INSTALL_MEMCACHED=true
83-
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
8480
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
8581
# Install the php memcached extension
8682
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 \
10298
# Opcache:
10399
#####################################
104100
ARG INSTALL_OPCACHE=true
105-
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
106101
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
107102
docker-php-ext-install opcache && \
108103
docker-php-ext-enable opcache \

0 commit comments

Comments
 (0)