Skip to content

Commit

Permalink
Merge pull request #18 from devilbox/release-0.26
Browse files Browse the repository at this point in the history
Ensure to test against OpenSSL imap(s) during CI
  • Loading branch information
cytopia authored Mar 20, 2022
2 parents 9d3f04b + 534199e commit 334f455
Show file tree
Hide file tree
Showing 7 changed files with 3,539 additions and 32 deletions.
47 changes: 37 additions & 10 deletions Dockerfiles/Dockerfile.jessie
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ MAINTAINER "cytopia" <[email protected]>
ENV PHP_VERSION=5.3.29
ENV PHP_INI_DIR=/usr/local/etc/php

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

ENV PHP_BUILD_DEPS \
autoconf2.13 \
lemon \
libbison-dev \
libcurl4-openssl-dev \
libfl-dev \
Expand All @@ -17,6 +23,7 @@ ENV PHP_BUILD_DEPS \
libreadline6-dev \
librecode-dev \
libsqlite3-dev \
# libssl-dev/oldoldstable 1.0.1t-1
libssl-dev \
libxml2-dev

Expand All @@ -25,12 +32,15 @@ ENV PHP_RUNTIME_DEPS \
libpcre3 \
librecode0 \
libsqlite3-0 \
# libssl1.0.0/oldoldstable,now 1.0.1t-1
libssl1.0.0 \
libxml2 \
xz-utils

ENV BUILD_TOOLS \
autoconf \
bison \
bisonc++ \
ca-certificates \
curl \
dpkg-dev \
Expand Down Expand Up @@ -90,12 +100,12 @@ RUN set -eux \
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
# Remove Dependencies
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS} \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS_32}; \
fi \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -147,14 +157,27 @@ RUN set -eux \
--with-libdir="/lib/${debMultiarch}/" \
--with-config-file-path="${PHP_INI_DIR}" \
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
--disable-cgi \
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
--enable-ftp \
--with-openssl-dir=/usr/local/ssl \
\
# --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)
--enable-mbstring \
\
# --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)
--enable-mysqlnd \
\
--enable-fpm \
--with-fpm-user=www-data \
--with-fpm-group=www-data \
--disable-cgi \
--enable-mysqlnd \
--enable-pdo \
--with-mysql \
--with-mysqli \
# https://github.com/docker-library/php/issues/439
--with-mhash \
\
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
--with-pdo-sqlite=/usr \
--with-sqlite3=/usr \
\
--with-curl \
--with-openssl=/usr/local/ssl \
--with-readline \
Expand All @@ -167,13 +190,13 @@ RUN set -eux \
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
&& docker-php-source delete \
# Remove Dependencies
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${PHP_BUILD_DEPS} \
${BUILD_TOOLS} \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS_32}; \
fi \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${PHP_BUILD_DEPS} \
${BUILD_TOOLS} \
# Install Run-time requirements
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
Expand All @@ -182,6 +205,10 @@ RUN set -eux \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

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

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

Expand Down
47 changes: 37 additions & 10 deletions Dockerfiles/Dockerfile.jessie-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ MAINTAINER "cytopia" <[email protected]>
ENV PHP_VERSION=5.3.29
ENV PHP_INI_DIR=/usr/local/etc/php

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

ENV PHP_BUILD_DEPS \
autoconf2.13 \
lemon \
libbison-dev \
libcurl4-openssl-dev \
libfl-dev \
Expand All @@ -17,6 +23,7 @@ ENV PHP_BUILD_DEPS \
libreadline6-dev \
librecode-dev \
libsqlite3-dev \
# libssl-dev/oldoldstable 1.0.1t-1
libssl-dev \
libxml2-dev

Expand All @@ -25,12 +32,15 @@ ENV PHP_RUNTIME_DEPS \
libpcre3 \
librecode0 \
libsqlite3-0 \
# libssl1.0.0/oldoldstable,now 1.0.1t-1
libssl1.0.0 \
libxml2 \
xz-utils

ENV BUILD_TOOLS \
autoconf \
bison \
bisonc++ \
ca-certificates \
curl \
dpkg-dev \
Expand Down Expand Up @@ -118,12 +128,12 @@ RUN set -eux \
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
# Remove Dependencies
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS} \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS_32}; \
fi \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -175,14 +185,27 @@ RUN set -eux \
--with-libdir="/lib/${debMultiarch}/" \
--with-config-file-path="${PHP_INI_DIR}" \
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
--disable-cgi \
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
--enable-ftp \
--with-openssl-dir=/usr/local/ssl \
\
# --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)
--enable-mbstring \
\
# --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)
--enable-mysqlnd \
\
--enable-fpm \
--with-fpm-user=www-data \
--with-fpm-group=www-data \
--disable-cgi \
--enable-mysqlnd \
--enable-pdo \
--with-mysql \
--with-mysqli \
# https://github.com/docker-library/php/issues/439
--with-mhash \
\
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
--with-pdo-sqlite=/usr \
--with-sqlite3=/usr \
\
--with-curl \
--with-openssl=/usr/local/ssl \
--with-readline \
Expand All @@ -195,13 +218,13 @@ RUN set -eux \
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
&& docker-php-source delete \
# Remove Dependencies
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${PHP_BUILD_DEPS} \
${BUILD_TOOLS} \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS_32}; \
fi \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${PHP_BUILD_DEPS} \
${BUILD_TOOLS} \
# Install Run-time requirements
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
Expand All @@ -210,6 +233,10 @@ RUN set -eux \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

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

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

Expand Down
49 changes: 39 additions & 10 deletions Dockerfiles/Dockerfile.stretch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ MAINTAINER "cytopia" <[email protected]>
ENV PHP_VERSION=5.3.29
ENV PHP_INI_DIR=/usr/local/etc/php

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

ENV PHP_BUILD_DEPS \
autoconf2.13 \
lemon \
libbison-dev \
libcurl4-openssl-dev \
libfl-dev \
Expand All @@ -17,6 +23,7 @@ ENV PHP_BUILD_DEPS \
libreadline6-dev \
librecode-dev \
libsqlite3-dev \
# libssl-dev/stretch 1.1.0l-1
libssl-dev \
libxml2-dev

Expand All @@ -25,12 +32,17 @@ ENV PHP_RUNTIME_DEPS \
libpcre3 \
librecode0 \
libsqlite3-0 \
# libssl1.0.2/stretch,now 1.0.2u-1
libssl1.0.2 \
# libssl1.1/stretch,now 1.1.0l-1
libssl1.1 \
libxml2 \
xz-utils

ENV BUILD_TOOLS \
autoconf \
bison \
bisonc++ \
ca-certificates \
curl \
dpkg-dev \
Expand Down Expand Up @@ -90,12 +102,12 @@ RUN set -eux \
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
# Remove Dependencies
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS} \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS_32}; \
fi \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down Expand Up @@ -150,14 +162,27 @@ RUN set -eux \
--with-libdir="/lib/${debMultiarch}/" \
--with-config-file-path="${PHP_INI_DIR}" \
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
--disable-cgi \
# --enable-ftp is included here because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
--enable-ftp \
--with-openssl-dir=/usr/local/ssl \
\
# --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)
--enable-mbstring \
\
# --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)
--enable-mysqlnd \
\
--enable-fpm \
--with-fpm-user=www-data \
--with-fpm-group=www-data \
--disable-cgi \
--enable-mysqlnd \
--enable-pdo \
--with-mysql \
--with-mysqli \
# https://github.com/docker-library/php/issues/439
--with-mhash \
\
# always build against system sqlite3 (https://github.com/php/php-src/commit/6083a387a81dbbd66d6316a3a12a63f06d5f7109)
--with-pdo-sqlite=/usr \
--with-sqlite3=/usr \
\
--with-curl \
--with-openssl=/usr/local/ssl \
--with-readline \
Expand All @@ -170,13 +195,13 @@ RUN set -eux \
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
&& docker-php-source delete \
# Remove Dependencies
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${PHP_BUILD_DEPS} \
${BUILD_TOOLS} \
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${BUILD_TOOLS_32}; \
fi \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
${PHP_BUILD_DEPS} \
${BUILD_TOOLS} \
# Install Run-time requirements
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
Expand All @@ -185,6 +210,10 @@ RUN set -eux \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

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

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

Expand Down
Loading

0 comments on commit 334f455

Please sign in to comment.