1
- FROM buildpack-deps:jessie
1
+ FROM buildpack-deps:jessie as php53
2
2
3
3
ENV PHP_VERSION 5.3.29
4
4
5
+ RUN set -eux; \
6
+ codename='jessie' ; \
7
+ { \
8
+ echo "deb http://archive.debian.org/debian ${codename} main" ; \
9
+ echo "deb http://archive.debian.org/debian ${codename}-backports main" ; \
10
+ echo "deb http://archive.debian.org/debian-security ${codename}/updates main" ; \
11
+ } > /etc/apt/sources.list;
12
+
5
13
# php 5.3 needs older autoconf
6
14
RUN set -eux; \
7
15
\
8
16
apt-get update; \
9
- apt-get install -y \
17
+ apt-get install -y --force-yes --no-upgrade --no-install-recommends \
10
18
curl \
11
19
autoconf2.13 \
12
20
; \
@@ -18,7 +26,7 @@ RUN set -eux; \
18
26
dpkg -i bison_2.7.1.dfsg-1_amd64.deb; \
19
27
rm *.deb; \
20
28
\
21
- curl -sSLf "https://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2; \
29
+ curl --insecure - sSLf "https://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2; \
22
30
echo 'c4e1cf6972b2a9c7f2777a18497d83bf713cdbecabb65d3ff62ba441aebb0091 php.tar.bz2' | sha256sum -cw --status; \
23
31
\
24
32
mkdir -p /usr/src/php; \
@@ -32,6 +40,8 @@ RUN set -eux; \
32
40
--with-pdo-mysql \
33
41
--with-zlib \
34
42
--enable-mbstring \
43
+ --with-openssl=/usr \
44
+ --with-libdir=lib/x86_64-linux-gnu \
35
45
; \
36
46
make -j"$(nproc)" ; \
37
47
make install; \
@@ -40,11 +50,15 @@ RUN set -eux; \
40
50
bison \
41
51
libbison-dev \
42
52
; \
43
- apt-get purge -y --auto-remove \
53
+ apt-get purge -y --force-yes -- auto-remove \
44
54
autoconf2.13 \
45
55
; \
46
56
rm -r /usr/src/php
47
57
58
+ CMD ["php" , "-a" ]
59
+
60
+ FROM php53
61
+
48
62
# Install APC PHP extension
49
63
#
50
64
RUN set -eux; \
@@ -54,4 +68,38 @@ RUN set -eux; \
54
68
\
55
69
rm -r /tmp/pear;
56
70
57
- CMD ["php" , "-a" ]
71
+ # Install composer
72
+ #
73
+ RUN set -eux; \
74
+ composerVersion='1.10.27' ; \
75
+ installerUrl='https://raw.githubusercontent.com/composer/getcomposer.org/a19025d6c0a1ff9fc1fac341128b2823193be462/web/installer' ; \
76
+ \
77
+ curl --insecure -sSLf "${installerUrl}" -o /usr/local/bin/composer-installer.php; \
78
+ echo '203196aedb1a3b0f563363796bbf6f647a4f8c2419bc1dfc5aa45adc1725025d /usr/local/bin/composer-installer.php' \
79
+ | sha256sum -cw --status; \
80
+ \
81
+ { \
82
+ echo '#! /usr/bin/env php' ; \
83
+ cat /usr/local/bin/composer-installer.php; \
84
+ } > /usr/local/bin/composer-installer; \
85
+ rm /usr/local/bin/composer-installer.php; \
86
+ chmod +x /usr/local/bin/composer-installer; \
87
+ \
88
+ composer-installer \
89
+ --disable-tls \
90
+ --version="${composerVersion}" \
91
+ --filename=composer \
92
+ --install-dir=/usr/local/bin \
93
+ ; \
94
+ \
95
+ echo '230d28fb29f3c6c07ab2382390bef313e36de17868b2bd23b2e070554cae23d2 /usr/local/bin/composer' \
96
+ | sha256sum -cw --status; \
97
+ \
98
+ composer --version; \
99
+ \
100
+ apt-get update; \
101
+ apt-get install -y --force-yes --no-upgrade --no-install-recommends \
102
+ git \
103
+ ; \
104
+ rm -r /var/lib/apt/lists/*; \
105
+ :;
0 commit comments