forked from doctrine/doctrine1
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docker images build to handle old linux distributions
- Loading branch information
Showing
9 changed files
with
688 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,92 @@ | ||
FROM php:5.4-cli | ||
|
||
RUN set -eux; \ | ||
codename='jessie'; \ | ||
{ \ | ||
echo "deb http://archive.debian.org/debian ${codename} main"; \ | ||
echo "deb http://archive.debian.org/debian ${codename}-backports main"; \ | ||
echo "deb http://archive.debian.org/debian-security ${codename}/updates main"; \ | ||
} > /etc/apt/sources.list; | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --force-yes --no-upgrade --no-install-recommends \ | ||
ca-certificates \ | ||
; \ | ||
\ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
:; | ||
|
||
RUN docker-php-ext-install pdo | ||
RUN docker-php-ext-install pdo_mysql | ||
RUN docker-php-ext-install mbstring | ||
|
||
# Install APC PHP extension | ||
# | ||
RUN set -eux; \ | ||
pecl install apc-3.1.13; \ | ||
docker-php-ext-enable apc; \ | ||
rm -r /tmp/pear; | ||
|
||
# Install memcache PHP extension | ||
# | ||
ARG MEMCACHE_VERSION | ||
RUN set -eux; \ | ||
buildDeps=' \ | ||
libzip-dev \ | ||
'; \ | ||
apt-get update; \ | ||
apt-get install -y --force-yes --no-upgrade --no-install-recommends \ | ||
$buildDeps \ | ||
; \ | ||
\ | ||
pecl install memcache-${MEMCACHE_VERSION}; \ | ||
docker-php-ext-enable memcache; \ | ||
\ | ||
apt-get purge -y --force-yes --auto-remove -o APT::AutoRemove::RecommendsImportant=true \ | ||
$buildDeps \ | ||
; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
rm -r /tmp/pear | ||
|
||
# Install composer | ||
# | ||
RUN set -eux; \ | ||
composerVersion='1.10.27'; \ | ||
installerUrl='https://raw.githubusercontent.com/composer/getcomposer.org/a19025d6c0a1ff9fc1fac341128b2823193be462/web/installer'; \ | ||
\ | ||
curl --insecure -sSLf "${installerUrl}" -o /usr/local/bin/composer-installer.php; \ | ||
echo '203196aedb1a3b0f563363796bbf6f647a4f8c2419bc1dfc5aa45adc1725025d /usr/local/bin/composer-installer.php' \ | ||
| sha256sum -cw --status; \ | ||
\ | ||
{ \ | ||
echo '#! /usr/bin/env php'; \ | ||
cat /usr/local/bin/composer-installer.php; \ | ||
} > /usr/local/bin/composer-installer; \ | ||
rm /usr/local/bin/composer-installer.php; \ | ||
chmod +x /usr/local/bin/composer-installer; \ | ||
\ | ||
composer-installer \ | ||
--disable-tls \ | ||
--version="${composerVersion}" \ | ||
--filename=composer \ | ||
--install-dir=/usr/local/bin \ | ||
; \ | ||
\ | ||
echo '230d28fb29f3c6c07ab2382390bef313e36de17868b2bd23b2e070554cae23d2 /usr/local/bin/composer' \ | ||
| sha256sum -cw --status; \ | ||
\ | ||
composer --version; \ | ||
\ | ||
apt-get update; \ | ||
apt-get install -y --force-yes --no-upgrade --no-install-recommends \ | ||
git \ | ||
libzip-dev \ | ||
unzip \ | ||
; \ | ||
rm -r /var/lib/apt/lists/*; \ | ||
\ | ||
docker-php-ext-install zip; \ | ||
:; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,98 @@ | ||
ARG PHP_TAG | ||
FROM php:${PHP_TAG} | ||
|
||
RUN set -eux; \ | ||
codename='jessie'; \ | ||
{ \ | ||
echo "deb http://archive.debian.org/debian ${codename} main"; \ | ||
echo "deb http://archive.debian.org/debian ${codename}-backports main"; \ | ||
echo "deb http://archive.debian.org/debian-security ${codename}/updates main"; \ | ||
} > /etc/apt/sources.list; | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --force-yes --no-upgrade --no-install-recommends \ | ||
ca-certificates \ | ||
; \ | ||
\ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
:; | ||
|
||
RUN docker-php-ext-install pdo | ||
RUN docker-php-ext-install pdo_mysql | ||
RUN docker-php-ext-install mbstring | ||
|
||
# Install APCu PHP extension | ||
# | ||
ARG APCU_VERSION | ||
RUN set -eux; \ | ||
\ | ||
test x"" = x"${APCU_VERSION}" || { \ | ||
pecl install apcu-${APCU_VERSION}; \ | ||
docker-php-ext-enable apcu; \ | ||
\ | ||
rm -r /tmp/pear; \ | ||
} | ||
|
||
# Install memcache PHP extension | ||
# | ||
ARG MEMCACHE_VERSION | ||
RUN set -eux; \ | ||
buildDeps=' \ | ||
libzip-dev \ | ||
'; \ | ||
apt-get update; \ | ||
apt-get install -y --force-yes --no-upgrade --no-install-recommends \ | ||
$buildDeps \ | ||
; \ | ||
\ | ||
pecl install memcache-${MEMCACHE_VERSION}; \ | ||
docker-php-ext-enable memcache; \ | ||
\ | ||
apt-get purge -y --force-yes --auto-remove -o APT::AutoRemove::RecommendsImportant=true \ | ||
$buildDeps \ | ||
; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
rm -r /tmp/pear | ||
|
||
# Install composer | ||
# | ||
RUN set -eux; \ | ||
composerVersion='1.10.27'; \ | ||
installerUrl='https://raw.githubusercontent.com/composer/getcomposer.org/a19025d6c0a1ff9fc1fac341128b2823193be462/web/installer'; \ | ||
\ | ||
curl --insecure -sSLf "${installerUrl}" -o /usr/local/bin/composer-installer.php; \ | ||
echo '203196aedb1a3b0f563363796bbf6f647a4f8c2419bc1dfc5aa45adc1725025d /usr/local/bin/composer-installer.php' \ | ||
| sha256sum -cw --status; \ | ||
\ | ||
{ \ | ||
echo '#! /usr/bin/env php'; \ | ||
cat /usr/local/bin/composer-installer.php; \ | ||
} > /usr/local/bin/composer-installer; \ | ||
rm /usr/local/bin/composer-installer.php; \ | ||
chmod +x /usr/local/bin/composer-installer; \ | ||
\ | ||
composer-installer \ | ||
--disable-tls \ | ||
--version="${composerVersion}" \ | ||
--filename=composer \ | ||
--install-dir=/usr/local/bin \ | ||
; \ | ||
\ | ||
echo '230d28fb29f3c6c07ab2382390bef313e36de17868b2bd23b2e070554cae23d2 /usr/local/bin/composer' \ | ||
| sha256sum -cw --status; \ | ||
\ | ||
composer --version; \ | ||
\ | ||
apt-get update; \ | ||
apt-get install -y --force-yes --no-upgrade --no-install-recommends \ | ||
git \ | ||
libzip-dev \ | ||
unzip \ | ||
; \ | ||
rm -r /var/lib/apt/lists/*; \ | ||
\ | ||
docker-php-ext-install zip; \ | ||
:; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.