Skip to content

Commit 334f455

Browse files
authored
Merge pull request #18 from devilbox/release-0.26
Ensure to test against OpenSSL imap(s) during CI
2 parents 9d3f04b + 534199e commit 334f455

7 files changed

Lines changed: 3539 additions & 32 deletions

Dockerfiles/Dockerfile.jessie

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
55
ENV PHP_VERSION=5.3.29
66
ENV PHP_INI_DIR=/usr/local/etc/php
77

8+
# PHP 5.3 does not work with OpenSSL version from Debian Stretch (need to pick it from Jessie)
9+
# https://github.com/devilbox/docker-php-fpm-5.3/issues/7
10+
#
11+
# https://manpages.debian.org/jessie/openssl/openssl.1ssl.en.html
12+
# https://www.openssl.org/source/old/1.0.1/
813
ENV OPENSSL_VERSION=1.0.1t
914

1015
ENV PHP_BUILD_DEPS \
1116
autoconf2.13 \
17+
lemon \
1218
libbison-dev \
1319
libcurl4-openssl-dev \
1420
libfl-dev \
@@ -17,6 +23,7 @@ ENV PHP_BUILD_DEPS \
1723
libreadline6-dev \
1824
librecode-dev \
1925
libsqlite3-dev \
26+
# libssl-dev/oldoldstable 1.0.1t-1
2027
libssl-dev \
2128
libxml2-dev
2229

@@ -25,12 +32,15 @@ ENV PHP_RUNTIME_DEPS \
2532
libpcre3 \
2633
librecode0 \
2734
libsqlite3-0 \
35+
# libssl1.0.0/oldoldstable,now 1.0.1t-1
2836
libssl1.0.0 \
2937
libxml2 \
3038
xz-utils
3139

3240
ENV BUILD_TOOLS \
3341
autoconf \
42+
bison \
43+
bisonc++ \
3444
ca-certificates \
3545
curl \
3646
dpkg-dev \
@@ -90,12 +100,12 @@ RUN set -eux \
90100
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
91101
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
92102
# Remove Dependencies
93-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
94-
${BUILD_TOOLS} \
95103
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
96104
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
97105
${BUILD_TOOLS_32}; \
98106
fi \
107+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
108+
${BUILD_TOOLS} \
99109
&& apt-get clean \
100110
&& rm -rf /var/lib/apt/lists/*
101111

@@ -147,14 +157,27 @@ RUN set -eux \
147157
--with-libdir="/lib/${debMultiarch}/" \
148158
--with-config-file-path="${PHP_INI_DIR}" \
149159
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
160+
--disable-cgi \
161+
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
162+
--enable-ftp \
163+
--with-openssl-dir=/usr/local/ssl \
164+
\
165+
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
166+
--enable-mbstring \
167+
\
168+
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
169+
--enable-mysqlnd \
170+
\
150171
--enable-fpm \
151172
--with-fpm-user=www-data \
152173
--with-fpm-group=www-data \
153-
--disable-cgi \
154-
--enable-mysqlnd \
155-
--enable-pdo \
156-
--with-mysql \
157-
--with-mysqli \
174+
# https://github.com/docker-library/php/issues/439
175+
--with-mhash \
176+
\
177+
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
178+
--with-pdo-sqlite=/usr \
179+
--with-sqlite3=/usr \
180+
\
158181
--with-curl \
159182
--with-openssl=/usr/local/ssl \
160183
--with-readline \
@@ -167,13 +190,13 @@ RUN set -eux \
167190
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
168191
&& docker-php-source delete \
169192
# Remove Dependencies
170-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
171-
${PHP_BUILD_DEPS} \
172-
${BUILD_TOOLS} \
173193
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
174194
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
175195
${BUILD_TOOLS_32}; \
176196
fi \
197+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
198+
${PHP_BUILD_DEPS} \
199+
${BUILD_TOOLS} \
177200
# Install Run-time requirements
178201
&& apt-get update \
179202
&& apt-get install -y --no-install-recommends --no-install-suggests \
@@ -182,6 +205,10 @@ RUN set -eux \
182205
&& apt-get clean \
183206
&& rm -rf /var/lib/apt/lists/*
184207

208+
# Fix config.guess for PHP modules (adds 'aarch64' [arm64] architecture)
209+
# The config.guess has been copied from PHP 5.5
210+
COPY data/php/usr-local-lib-php-build-config.guess /usr/local/lib/php/build/config.guess
211+
COPY data/php/usr-local-lib-php-build-config.sub /usr/local/lib/php/build/config.sub
185212

186213
COPY data/docker-php-* /usr/local/bin/
187214

Dockerfiles/Dockerfile.jessie-arm64

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
55
ENV PHP_VERSION=5.3.29
66
ENV PHP_INI_DIR=/usr/local/etc/php
77

8+
# PHP 5.3 does not work with OpenSSL version from Debian Stretch (need to pick it from Jessie)
9+
# https://github.com/devilbox/docker-php-fpm-5.3/issues/7
10+
#
11+
# https://manpages.debian.org/jessie/openssl/openssl.1ssl.en.html
12+
# https://www.openssl.org/source/old/1.0.1/
813
ENV OPENSSL_VERSION=1.0.1t
914

1015
ENV PHP_BUILD_DEPS \
1116
autoconf2.13 \
17+
lemon \
1218
libbison-dev \
1319
libcurl4-openssl-dev \
1420
libfl-dev \
@@ -17,6 +23,7 @@ ENV PHP_BUILD_DEPS \
1723
libreadline6-dev \
1824
librecode-dev \
1925
libsqlite3-dev \
26+
# libssl-dev/oldoldstable 1.0.1t-1
2027
libssl-dev \
2128
libxml2-dev
2229

@@ -25,12 +32,15 @@ ENV PHP_RUNTIME_DEPS \
2532
libpcre3 \
2633
librecode0 \
2734
libsqlite3-0 \
35+
# libssl1.0.0/oldoldstable,now 1.0.1t-1
2836
libssl1.0.0 \
2937
libxml2 \
3038
xz-utils
3139

3240
ENV BUILD_TOOLS \
3341
autoconf \
42+
bison \
43+
bisonc++ \
3444
ca-certificates \
3545
curl \
3646
dpkg-dev \
@@ -118,12 +128,12 @@ RUN set -eux \
118128
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
119129
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
120130
# Remove Dependencies
121-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
122-
${BUILD_TOOLS} \
123131
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
124132
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
125133
${BUILD_TOOLS_32}; \
126134
fi \
135+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
136+
${BUILD_TOOLS} \
127137
&& apt-get clean \
128138
&& rm -rf /var/lib/apt/lists/*
129139

@@ -175,14 +185,27 @@ RUN set -eux \
175185
--with-libdir="/lib/${debMultiarch}/" \
176186
--with-config-file-path="${PHP_INI_DIR}" \
177187
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
188+
--disable-cgi \
189+
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
190+
--enable-ftp \
191+
--with-openssl-dir=/usr/local/ssl \
192+
\
193+
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
194+
--enable-mbstring \
195+
\
196+
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
197+
--enable-mysqlnd \
198+
\
178199
--enable-fpm \
179200
--with-fpm-user=www-data \
180201
--with-fpm-group=www-data \
181-
--disable-cgi \
182-
--enable-mysqlnd \
183-
--enable-pdo \
184-
--with-mysql \
185-
--with-mysqli \
202+
# https://github.com/docker-library/php/issues/439
203+
--with-mhash \
204+
\
205+
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
206+
--with-pdo-sqlite=/usr \
207+
--with-sqlite3=/usr \
208+
\
186209
--with-curl \
187210
--with-openssl=/usr/local/ssl \
188211
--with-readline \
@@ -195,13 +218,13 @@ RUN set -eux \
195218
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
196219
&& docker-php-source delete \
197220
# Remove Dependencies
198-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
199-
${PHP_BUILD_DEPS} \
200-
${BUILD_TOOLS} \
201221
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
202222
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
203223
${BUILD_TOOLS_32}; \
204224
fi \
225+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
226+
${PHP_BUILD_DEPS} \
227+
${BUILD_TOOLS} \
205228
# Install Run-time requirements
206229
&& apt-get update \
207230
&& apt-get install -y --no-install-recommends --no-install-suggests \
@@ -210,6 +233,10 @@ RUN set -eux \
210233
&& apt-get clean \
211234
&& rm -rf /var/lib/apt/lists/*
212235

236+
# Fix config.guess for PHP modules (adds 'aarch64' [arm64] architecture)
237+
# The config.guess has been copied from PHP 5.5
238+
COPY data/php/usr-local-lib-php-build-config.guess /usr/local/lib/php/build/config.guess
239+
COPY data/php/usr-local-lib-php-build-config.sub /usr/local/lib/php/build/config.sub
213240

214241
COPY data/docker-php-* /usr/local/bin/
215242

Dockerfiles/Dockerfile.stretch

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ MAINTAINER "cytopia" <cytopia@everythingcli.org>
55
ENV PHP_VERSION=5.3.29
66
ENV PHP_INI_DIR=/usr/local/etc/php
77

8+
# PHP 5.3 does not work with OpenSSL version from Debian Stretch (need to pick it from Jessie)
9+
# https://github.com/devilbox/docker-php-fpm-5.3/issues/7
10+
#
11+
# https://manpages.debian.org/jessie/openssl/openssl.1ssl.en.html
12+
# https://www.openssl.org/source/old/1.0.1/
813
ENV OPENSSL_VERSION=1.0.1t
914

1015
ENV PHP_BUILD_DEPS \
1116
autoconf2.13 \
17+
lemon \
1218
libbison-dev \
1319
libcurl4-openssl-dev \
1420
libfl-dev \
@@ -17,6 +23,7 @@ ENV PHP_BUILD_DEPS \
1723
libreadline6-dev \
1824
librecode-dev \
1925
libsqlite3-dev \
26+
# libssl-dev/stretch 1.1.0l-1
2027
libssl-dev \
2128
libxml2-dev
2229

@@ -25,12 +32,17 @@ ENV PHP_RUNTIME_DEPS \
2532
libpcre3 \
2633
librecode0 \
2734
libsqlite3-0 \
35+
# libssl1.0.2/stretch,now 1.0.2u-1
2836
libssl1.0.2 \
37+
# libssl1.1/stretch,now 1.1.0l-1
38+
libssl1.1 \
2939
libxml2 \
3040
xz-utils
3141

3242
ENV BUILD_TOOLS \
3343
autoconf \
44+
bison \
45+
bisonc++ \
3446
ca-certificates \
3547
curl \
3648
dpkg-dev \
@@ -90,12 +102,12 @@ RUN set -eux \
90102
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
91103
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
92104
# Remove Dependencies
93-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
94-
${BUILD_TOOLS} \
95105
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
96106
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
97107
${BUILD_TOOLS_32}; \
98108
fi \
109+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
110+
${BUILD_TOOLS} \
99111
&& apt-get clean \
100112
&& rm -rf /var/lib/apt/lists/*
101113

@@ -150,14 +162,27 @@ RUN set -eux \
150162
--with-libdir="/lib/${debMultiarch}/" \
151163
--with-config-file-path="${PHP_INI_DIR}" \
152164
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
165+
--disable-cgi \
166+
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
167+
--enable-ftp \
168+
--with-openssl-dir=/usr/local/ssl \
169+
\
170+
# --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
171+
--enable-mbstring \
172+
\
173+
# --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
174+
--enable-mysqlnd \
175+
\
153176
--enable-fpm \
154177
--with-fpm-user=www-data \
155178
--with-fpm-group=www-data \
156-
--disable-cgi \
157-
--enable-mysqlnd \
158-
--enable-pdo \
159-
--with-mysql \
160-
--with-mysqli \
179+
# https://github.com/docker-library/php/issues/439
180+
--with-mhash \
181+
\
182+
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
183+
--with-pdo-sqlite=/usr \
184+
--with-sqlite3=/usr \
185+
\
161186
--with-curl \
162187
--with-openssl=/usr/local/ssl \
163188
--with-readline \
@@ -170,13 +195,13 @@ RUN set -eux \
170195
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
171196
&& docker-php-source delete \
172197
# Remove Dependencies
173-
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
174-
${PHP_BUILD_DEPS} \
175-
${BUILD_TOOLS} \
176198
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
177199
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
178200
${BUILD_TOOLS_32}; \
179201
fi \
202+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
203+
${PHP_BUILD_DEPS} \
204+
${BUILD_TOOLS} \
180205
# Install Run-time requirements
181206
&& apt-get update \
182207
&& apt-get install -y --no-install-recommends --no-install-suggests \
@@ -185,6 +210,10 @@ RUN set -eux \
185210
&& apt-get clean \
186211
&& rm -rf /var/lib/apt/lists/*
187212

213+
# Fix config.guess for PHP modules (adds 'aarch64' [arm64] architecture)
214+
# The config.guess has been copied from PHP 5.5
215+
COPY data/php/usr-local-lib-php-build-config.guess /usr/local/lib/php/build/config.guess
216+
COPY data/php/usr-local-lib-php-build-config.sub /usr/local/lib/php/build/config.sub
188217

189218
COPY data/docker-php-* /usr/local/bin/
190219

0 commit comments

Comments
 (0)