commit
5c1a92ca95
|
@ -6,7 +6,7 @@ This repository contains a script that can be used to easily install a PHP exten
|
||||||
|
|
||||||
The script will install all the required APT/APK packages; at the end of the script execution, the no-more needed packages will be removed so that the image will be much smaller.
|
The script will install all the required APT/APK packages; at the end of the script execution, the no-more needed packages will be removed so that the image will be much smaller.
|
||||||
|
|
||||||
The script works both for Alpine and Debian Linux.
|
Supported docker images are all the Alpine/Debian versions, except for PHP 5.5 where we only support Debian 8 (jessie) (that is, `php:5.5`, `php:5.5-apache`, `php:5.5-cli`, `php:5.5-fpm`, `php:5.5-zts`)
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
amqp 5.6 7.0 7.1 7.2 7.3 7.4
|
amqp 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
apcu 5.6 7.0 7.1 7.2 7.3 7.4
|
apcu 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
bcmath 5.6 7.0 7.1 7.2 7.3 7.4
|
bcmath 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
bz2 5.6 7.0 7.1 7.2 7.3 7.4
|
bz2 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
calendar 5.6 7.0 7.1 7.2 7.3 7.4
|
calendar 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
cmark 7.0 7.1 7.2 7.3 7.4
|
cmark 7.0 7.1 7.2 7.3 7.4
|
||||||
dba 5.6 7.0 7.1 7.2 7.3 7.4
|
dba 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
enchant 5.6 7.0 7.1 7.2 7.3 7.4
|
enchant 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
exif 5.6 7.0 7.1 7.2 7.3 7.4
|
exif 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
gd 5.6 7.0 7.1 7.2 7.3 7.4
|
gd 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
gettext 5.6 7.0 7.1 7.2 7.3 7.4
|
gettext 5.5 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
gmagick 5.6 7.0 7.1 7.2 7.3 7.4
|
gmagick 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
gmp 5.6 7.0 7.1 7.2 7.3 7.4
|
gmp 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
grpc 5.6 7.0 7.1 7.2 7.3 7.4
|
grpc 5.6 7.0 7.1 7.2 7.3 7.4
|
||||||
|
|
|
@ -645,6 +645,7 @@ buildRequiredPackageLists() {
|
||||||
;;
|
;;
|
||||||
debian)
|
debian)
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
DEBIAN_FRONTEND=noninteractive apt-get update -q
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get upgrade -qqy
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test -n "$buildRequiredPackageLists_persistent"; then
|
if test -n "$buildRequiredPackageLists_persistent"; then
|
||||||
|
@ -1324,7 +1325,7 @@ mkdir -p /tmp/src
|
||||||
IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)"
|
IPE_ERRFLAG_FILE="$(mktemp -p /tmp/src)"
|
||||||
PHP_MAJMIN_VERSION=$(getPHPMajorMinor)
|
PHP_MAJMIN_VERSION=$(getPHPMajorMinor)
|
||||||
case "$PHP_MAJMIN_VERSION" in
|
case "$PHP_MAJMIN_VERSION" in
|
||||||
506 | 700 | 701 | 702 | 703 | 704) ;;
|
505 | 506 | 700 | 701 | 702 | 703 | 704) ;;
|
||||||
*)
|
*)
|
||||||
printf "### ERROR: Unsupported PHP version: %s.%s ###\n" $((PHP_MAJMIN_VERSION / 100)) $((PHP_MAJMIN_VERSION % 100))
|
printf "### ERROR: Unsupported PHP version: %s.%s ###\n" $((PHP_MAJMIN_VERSION / 100)) $((PHP_MAJMIN_VERSION % 100))
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -37,11 +37,20 @@ try {
|
||||||
throw new Exception("{$saveFuntion}() function is missing");
|
throw new Exception("{$saveFuntion}() function is missing");
|
||||||
}
|
}
|
||||||
$tempFile = tempnam(sys_get_temp_dir(), 'dpei');
|
$tempFile = tempnam(sys_get_temp_dir(), 'dpei');
|
||||||
|
ob_start();
|
||||||
if ($saveFuntion($image, $tempFile) === false) {
|
if ($saveFuntion($image, $tempFile) === false) {
|
||||||
throw new Exception("{$saveFuntion}() failed");
|
throw new Exception("{$saveFuntion}() failed");
|
||||||
}
|
}
|
||||||
if (!is_file($tempFile) || filesize($tempFile) < 1) {
|
$contents = ob_get_contents();
|
||||||
throw new Exception("{$saveFuntion}() created an empty file");
|
ob_end_clean();
|
||||||
|
if (!is_file($tempFile)) {
|
||||||
|
throw new Exception("{$saveFuntion}() didn't create a file");
|
||||||
|
}
|
||||||
|
if (filesize($tempFile) < 1) {
|
||||||
|
if ($format !== 'xbm' || PHP_VERSION_ID >= 50600 || $contents === '') {
|
||||||
|
throw new Exception("{$saveFuntion}() created an empty file");
|
||||||
|
}
|
||||||
|
file_put_contents($tempFile, $contents);
|
||||||
}
|
}
|
||||||
$image2 = $loadFuntion($tempFile);
|
$image2 = $loadFuntion($tempFile);
|
||||||
unlink($tempFile);
|
unlink($tempFile);
|
||||||
|
|
|
@ -39,6 +39,14 @@ getDockerImageName() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
getDockerImageName_imageName="$(printf 'php:%s-%s-%s' "$getDockerImageName_version" "$getDockerImageName_suffix" "$DOCKER_DISTRO")"
|
getDockerImageName_imageName="$(printf 'php:%s-%s-%s' "$getDockerImageName_version" "$getDockerImageName_suffix" "$DOCKER_DISTRO")"
|
||||||
|
case "$getDockerImageName_imageName" in
|
||||||
|
php:5.5-cli-jessie)
|
||||||
|
getDockerImageName_imageName='php:5.5-cli'
|
||||||
|
;;
|
||||||
|
php:5.5-zts-jessie)
|
||||||
|
getDockerImageName_imageName='php:5.5-zts'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then
|
if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then
|
||||||
getDockerImageName_log="$(docker pull "$getDockerImageName_imageName" 2>&1 || true)"
|
getDockerImageName_log="$(docker pull "$getDockerImageName_imageName" 2>&1 || true)"
|
||||||
if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then
|
if test -z "$(docker images -q "$getDockerImageName_imageName" 2>/dev/null)"; then
|
||||||
|
|
Loading…
Reference in New Issue