Skip to content

Commit

Permalink
Merging the three Dockerfiles into one
Browse files Browse the repository at this point in the history
Will now depend on the PHP_VERSION build arg
  • Loading branch information
winfried-van-loon committed Apr 19, 2017
1 parent d8ff795 commit 9d18a09
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 164 deletions.
75 changes: 60 additions & 15 deletions Dockerfile-56 → 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 5" 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,6 +31,23 @@ RUN apt-get install -y software-properties-common && \

# Install "PHP Extentions", "libraries", "Software's"
RUN apt-get update && \
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 \
Expand All @@ -47,20 +66,46 @@ RUN apt-get update && \
php5.6-memcached \
php5.6-gd \
php5.6-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} = 70 ]; then \
apt-get install -y --allow-downgrades --allow-remove-essential \
--allow-change-held-packages \
php7.0-cli \
php7.0-common \
php7.0-curl \
php7.0-json \
php7.0-xml \
php7.0-mbstring \
php7.0-mcrypt \
php7.0-mysql \
php7.0-pgsql \
php7.0-sqlite \
php7.0-sqlite3 \
php7.0-zip \
php7.0-bcmath \
php7.0-memcached \
php7.0-gd \
php7.0-dev \
;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
75 changes: 0 additions & 75 deletions Dockerfile-70

This file was deleted.

74 changes: 0 additions & 74 deletions Dockerfile-71

This file was deleted.

0 comments on commit 9d18a09

Please sign in to comment.