From b5fb3abdfb7634585ee7237a1396d5f11ddea8ef Mon Sep 17 00:00:00 2001 From: Bruno Date: Tue, 21 Feb 2017 12:51:29 -0300 Subject: [PATCH] Improved Docker Instructions (#11) Moved multiple `RUN` instructions into one. This will reduce the number of layers. Also, I added `rm -rf /var/lib/apt/lists/*` to remove unnecessary data. --- Dockerfile-71 | 50 ++++++++++++++++++++++---------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/Dockerfile-71 b/Dockerfile-71 index 0fce594..aa3c423 100644 --- a/Dockerfile-71 +++ b/Dockerfile-71 @@ -18,34 +18,28 @@ MAINTAINER Mahmoud Zalt # Install "curl", "libmemcached-dev", "libpq-dev", "libjpeg-dev", # "libpng12-dev", "libfreetype6-dev", "libssl-dev", "libmcrypt-dev", -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ - curl \ - libmemcached-dev \ - libz-dev \ - libpq-dev \ - libjpeg-dev \ - libpng12-dev \ - libfreetype6-dev \ - libssl-dev \ - libmcrypt-dev +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + curl \ + libmemcached-dev \ + libz-dev \ + libpq-dev \ + libjpeg-dev \ + libpng12-dev \ + libfreetype6-dev \ + libssl-dev \ + libmcrypt-dev \ + && rm -rf /var/lib/apt/lists/* # Install the PHP mcrypt extention -RUN docker-php-ext-install mcrypt - -# Install the PHP pdo_mysql extention -RUN docker-php-ext-install pdo_mysql - -# Install the PHP pdo_pgsql extention -RUN docker-php-ext-install pdo_pgsql - -##################################### -# gd: -##################################### - -# Install the PHP gd library -RUN docker-php-ext-configure gd \ - --enable-gd-native-ttf \ - --with-jpeg-dir=/usr/lib \ - --with-freetype-dir=/usr/include/freetype2 && \ +RUN docker-php-ext-install mcrypt \ + # Install the PHP pdo_mysql extention + && docker-php-ext-install pdo_mysql \ + # Install the PHP pdo_pgsql extention + && docker-php-ext-install pdo_pgsql \ + # Install the PHP gd library + && docker-php-ext-configure gd \ + --enable-gd-native-ttf \ + --with-jpeg-dir=/usr/lib \ + --with-freetype-dir=/usr/include/freetype2 && \ docker-php-ext-install gd