Skip to content

Commit

Permalink
Improved Docker Instructions (#11)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brunocascio authored and appleboy committed Feb 21, 2017
1 parent ad5a8e4 commit b5fb3ab
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions Dockerfile-71
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,28 @@ MAINTAINER Mahmoud Zalt <[email protected]>

# 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

0 comments on commit b5fb3ab

Please sign in to comment.