Skip to content

Commit

Permalink
Merge pull request #16 from winfried-van-loon/8-cleanup-dockerfiles
Browse files Browse the repository at this point in the history
Cleanup dockerfiles
  • Loading branch information
Mahmoudz committed Apr 20, 2017
2 parents 21ae657 + 9d18a09 commit dbaa3fc
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 89 deletions.
78 changes: 62 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ ENV LC_CTYPE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV TERM xterm

# Add the "PHP 7" ppa
ARG PHP_VERSION=${PHP_VERSION:-70}

# Add the PHP ppa
RUN apt-get install -y software-properties-common && \
add-apt-repository -y ppa:ondrej/php

Expand All @@ -29,7 +31,44 @@ RUN apt-get install -y software-properties-common && \

# Install "PHP Extentions", "libraries", "Software's"
RUN apt-get update && \
apt-get install -y --force-yes \
apt-get install -y --allow-downgrades --allow-remove-essential \
--allow-change-held-packages \
pkg-config \
libcurl4-openssl-dev \
libedit-dev \
libssl-dev \
libxml2-dev \
xz-utils \
libsqlite3-dev \
sqlite3 \
git \
curl \
vim \
nano \
postgresql-client

RUN if [ ${PHP_VERSION} = 56 ]; then \
apt-get install -y --allow-downgrades --allow-remove-essential \
--allow-change-held-packages \
php5.6-cli \
php5.6-common \
php5.6-curl \
php5.6-json \
php5.6-xml \
php5.6-mbstring \
php5.6-mcrypt \
php5.6-mysql \
php5.6-pgsql \
php5.6-sqlite \
php5.6-sqlite3 \
php5.6-zip \
php5.6-bcmath \
php5.6-memcached \
php5.6-gd \
php5.6-dev \
;elif [ ${PHP_VERSION} = 70 ]; then \
apt-get install -y --allow-downgrades --allow-remove-essential \
--allow-change-held-packages \
php7.0-cli \
php7.0-common \
php7.0-curl \
Expand All @@ -46,20 +85,27 @@ RUN apt-get update && \
php7.0-memcached \
php7.0-gd \
php7.0-dev \
pkg-config \
libcurl4-openssl-dev \
libedit-dev \
libssl-dev \
libxml2-dev \
xz-utils \
libsqlite3-dev \
sqlite3 \
git \
curl \
vim \
nano \
postgresql-client \
&& apt-get clean
;elif [ ${PHP_VERSION} = 71 ]; then \
apt-get install -y --allow-downgrades --allow-remove-essential \
--allow-change-held-packages \
php7.1-cli \
php7.1-common \
php7.1-curl \
php7.1-json \
php7.1-xml \
php7.1-mbstring \
php7.1-mcrypt \
php7.1-mysql \
php7.1-pgsql \
php7.1-sqlite \
php7.1-sqlite3 \
php7.1-zip \
php7.1-memcached \
php7.1-gd \
php7.1-dev \
;fi

RUN apt-get clean

#####################################
# Composer:
Expand Down
73 changes: 0 additions & 73 deletions Dockerfile-71

This file was deleted.

0 comments on commit dbaa3fc

Please sign in to comment.