File tree Expand file tree Collapse file tree 3 files changed +164
-60
lines changed
Expand file tree Collapse file tree 3 files changed +164
-60
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,7 @@ ENV LC_CTYPE=en_US.UTF-8
1717ENV LANG=en_US.UTF-8
1818ENV TERM xterm
1919
20- ARG PHP_VERSION=${PHP_VERSION:-71}
21-
22- # Add the PHP ppa
20+ # Add the "PHP 5" ppa
2321RUN apt-get install -y software-properties-common && \
2422 add-apt-repository -y ppa:ondrej/php
2523
@@ -31,23 +29,6 @@ RUN apt-get install -y software-properties-common && \
3129
3230# Install "PHP Extentions", "libraries", "Software's"
3331RUN apt-get update && \
34- apt-get install -y --allow-downgrades --allow-remove-essential \
35- --allow-change-held-packages \
36- pkg-config \
37- libcurl4-openssl-dev \
38- libedit-dev \
39- libssl-dev \
40- libxml2-dev \
41- xz-utils \
42- libsqlite3-dev \
43- sqlite3 \
44- git \
45- curl \
46- vim \
47- nano \
48- postgresql-client
49-
50- RUN if [ ${PHP_VERSION} = 56 ]; then \
5132 apt-get install -y --allow-downgrades --allow-remove-essential \
5233 --allow-change-held-packages \
5334 php5.6-cli \
@@ -66,46 +47,20 @@ RUN if [ ${PHP_VERSION} = 56 ]; then \
6647 php5.6-memcached \
6748 php5.6-gd \
6849 php5.6-dev \
69- ;elif [ ${PHP_VERSION} = 70 ]; then \
70- apt-get install -y --allow-downgrades --allow-remove-essential \
71- --allow-change-held-packages \
72- php7.0-cli \
73- php7.0-common \
74- php7.0-curl \
75- php7.0-json \
76- php7.0-xml \
77- php7.0-mbstring \
78- php7.0-mcrypt \
79- php7.0-mysql \
80- php7.0-pgsql \
81- php7.0-sqlite \
82- php7.0-sqlite3 \
83- php7.0-zip \
84- php7.0-bcmath \
85- php7.0-memcached \
86- php7.0-gd \
87- php7.0-dev \
88- ;elif [ ${PHP_VERSION} = 71 ]; then \
89- apt-get install -y --allow-downgrades --allow-remove-essential \
90- --allow-change-held-packages \
91- php7.1-cli \
92- php7.1-common \
93- php7.1-curl \
94- php7.1-json \
95- php7.1-xml \
96- php7.1-mbstring \
97- php7.1-mcrypt \
98- php7.1-mysql \
99- php7.1-pgsql \
100- php7.1-sqlite \
101- php7.1-sqlite3 \
102- php7.1-zip \
103- php7.1-memcached \
104- php7.1-gd \
105- php7.1-dev \
106- ;fi
107-
108- RUN apt-get clean
50+ pkg-config \
51+ libcurl4-openssl-dev \
52+ libedit-dev \
53+ libssl-dev \
54+ libxml2-dev \
55+ xz-utils \
56+ libsqlite3-dev \
57+ sqlite3 \
58+ git \
59+ curl \
60+ vim \
61+ nano \
62+ postgresql-client \
63+ && apt-get clean
10964
11065#####################################
11166# Composer:
Original file line number Diff line number Diff line change 1+ #
2+ #--------------------------------------------------------------------------
3+ # Image Setup
4+ #--------------------------------------------------------------------------
5+ #
6+
7+ FROM phusion/baseimage:latest
8+
9+ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
10+
11+ RUN DEBIAN_FRONTEND=noninteractive
12+ RUN locale-gen en_US.UTF-8
13+
14+ ENV LANGUAGE=en_US.UTF-8
15+ ENV LC_ALL=en_US.UTF-8
16+ ENV LC_CTYPE=en_US.UTF-8
17+ ENV LANG=en_US.UTF-8
18+ ENV TERM xterm
19+
20+ # Add the "PHP 7" ppa
21+ RUN apt-get install -y software-properties-common && \
22+ add-apt-repository -y ppa:ondrej/php
23+
24+ #
25+ #--------------------------------------------------------------------------
26+ # Software's Installation
27+ #--------------------------------------------------------------------------
28+ #
29+
30+ # Install "PHP Extentions", "libraries", "Software's"
31+ RUN apt-get update && \
32+ apt-get install -y --allow-downgrades --allow-remove-essential \
33+ --allow-change-held-packages \
34+ php7.0-cli \
35+ php7.0-common \
36+ php7.0-curl \
37+ php7.0-json \
38+ php7.0-xml \
39+ php7.0-mbstring \
40+ php7.0-mcrypt \
41+ php7.0-mysql \
42+ php7.0-pgsql \
43+ php7.0-sqlite \
44+ php7.0-sqlite3 \
45+ php7.0-zip \
46+ php7.0-bcmath \
47+ php7.0-memcached \
48+ php7.0-gd \
49+ php7.0-dev \
50+ pkg-config \
51+ libcurl4-openssl-dev \
52+ libedit-dev \
53+ libssl-dev \
54+ libxml2-dev \
55+ xz-utils \
56+ libsqlite3-dev \
57+ sqlite3 \
58+ git \
59+ curl \
60+ vim \
61+ nano \
62+ postgresql-client \
63+ && apt-get clean
64+
65+ #####################################
66+ # Composer:
67+ #####################################
68+
69+ # Install composer and add its bin to the PATH.
70+ RUN curl -s http://getcomposer.org/installer | php && \
71+ echo "export PATH=${PATH}:/var/www/vendor/bin" >> ~/.bashrc && \
72+ mv composer.phar /usr/local/bin/composer
73+
74+ # Source the bash
75+ RUN . ~/.bashrc
Original file line number Diff line number Diff line change 1+ #
2+ #--------------------------------------------------------------------------
3+ # Image Setup
4+ #--------------------------------------------------------------------------
5+ #
6+
7+ FROM phusion/baseimage:latest
8+
9+ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
10+
11+ RUN DEBIAN_FRONTEND=noninteractive
12+ RUN locale-gen en_US.UTF-8
13+
14+ ENV LANGUAGE=en_US.UTF-8
15+ ENV LC_ALL=en_US.UTF-8
16+ ENV LC_CTYPE=en_US.UTF-8
17+ ENV LANG=en_US.UTF-8
18+ ENV TERM xterm
19+
20+ # Add the "PHP 7" ppa
21+ RUN apt-get install -y software-properties-common && \
22+ add-apt-repository -y ppa:ondrej/php
23+
24+ #
25+ #--------------------------------------------------------------------------
26+ # Software's Installation
27+ #--------------------------------------------------------------------------
28+ #
29+
30+ # Install "PHP Extentions", "libraries", "Software's"
31+ RUN apt-get update && \
32+ apt-get install -y --allow-downgrades --allow-remove-essential \
33+ --allow-change-held-packages \
34+ php7.1-cli \
35+ php7.1-common \
36+ php7.1-curl \
37+ php7.1-json \
38+ php7.1-xml \
39+ php7.1-mbstring \
40+ php7.1-mcrypt \
41+ php7.1-mysql \
42+ php7.1-pgsql \
43+ php7.1-sqlite \
44+ php7.1-sqlite3 \
45+ php7.1-zip \
46+ php7.1-memcached \
47+ php7.1-gd \
48+ php7.1-dev \
49+ pkg-config \
50+ libcurl4-openssl-dev \
51+ libedit-dev \
52+ libssl-dev \
53+ libxml2-dev \
54+ xz-utils \
55+ libsqlite3-dev \
56+ sqlite3 \
57+ git \
58+ curl \
59+ vim \
60+ nano \
61+ postgresql-client \
62+ && apt-get clean
63+
64+ #####################################
65+ # Composer:
66+ #####################################
67+
68+ # Install composer and add its bin to the PATH.
69+ RUN curl -s http://getcomposer.org/installer | php && \
70+ echo "export PATH=${PATH}:/var/www/vendor/bin" >> ~/.bashrc && \
71+ mv composer.phar /usr/local/bin/composer
72+
73+ # Source the bash
74+ RUN . ~/.bashrc
You can’t perform that action at this time.
0 commit comments