Skip to content

Commit

Permalink
Add Imagick to the PHP Image (#11)
Browse files Browse the repository at this point in the history
This merge adds ghostscript and exif, too.
  • Loading branch information
pento authored Aug 19, 2019
1 parent 0c4cc48 commit d15a119
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 41 deletions.
6 changes: 4 additions & 2 deletions 5.4/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd mysql mysqli zip; \
docker-php-ext-install gd mysql mysqli zip exif; \
\
pecl install xdebug-2.4.1; \
pecl install memcached-2.2.0; \
pecl install imagick-3.4.4; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 5.5/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd mysql mysqli zip; \
docker-php-ext-install gd mysql mysqli zip exif; \
\
pecl install xdebug-2.5.5; \
pecl install memcached-2.2.0; \
pecl install imagick-3.4.4; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 5.6/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd mysql mysqli zip; \
docker-php-ext-install gd mysql mysqli zip exif; \
\
pecl install xdebug-2.5.5; \
pecl install memcached-2.2.0; \
pecl install imagick-3.4.4; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 7.0/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd opcache mysqli zip; \
docker-php-ext-install gd opcache mysqli zip exif; \
\
pecl install xdebug-2.7.2; \
pecl install memcached-3.1.3; \
pecl install imagick; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 7.1/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd opcache mysqli zip; \
docker-php-ext-install gd opcache mysqli zip exif; \
\
pecl install xdebug-2.7.2; \
pecl install memcached-3.1.3; \
pecl install imagick; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 7.2/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd opcache mysqli zip; \
docker-php-ext-install gd opcache mysqli zip exif; \
\
pecl install xdebug-2.7.2; \
pecl install memcached-3.1.3; \
pecl install imagick; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 7.3/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd opcache mysqli zip; \
docker-php-ext-install gd opcache mysqli zip exif; \
\
pecl install xdebug-2.7.2; \
pecl install memcached-3.1.3; \
pecl install imagick; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
6 changes: 4 additions & 2 deletions 7.4/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ RUN set -ex; \
\
apt-get update; \
\
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip; \
apt-get install -y --no-install-recommends libjpeg-dev libpng-dev libzip-dev libmemcached-dev unzip libmagickwand-dev ghostscript; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
\
docker-php-ext-install gd opcache mysqli zip; \
docker-php-ext-install gd opcache mysqli zip exif; \
\
pecl install xdebug-2.8.0beta1; \
pecl install memcached-3.1.3; \
pecl install imagick; \
docker-php-ext-enable imagick; \
\
curl --silent --fail --location --retry 3 --output /tmp/installer.php --url https://getcomposer.org/installer; \
curl --silent --fail --location --retry 3 --output /tmp/installer.sig --url https://composer.github.io/installer.sig; \
Expand Down
56 changes: 31 additions & 25 deletions update.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
'5.4' => array(
'php' => array(
'base_name' => 'php:5.4-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'mysql', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.4.1', 'memcached-2.2.0' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'mysql', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.4.1', 'memcached-2.2.0', 'imagick-3.4.4' ),
'composer' => true,
),
'phpunit' => 4,
Expand All @@ -65,9 +65,9 @@
'5.5' => array(
'php' => array(
'base_name' => 'php:5.5-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'mysql', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.5.5', 'memcached-2.2.0' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'mysql', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.5.5', 'memcached-2.2.0', 'imagick-3.4.4' ),
'composer' => true,
),
'phpunit' => 4,
Expand All @@ -79,9 +79,9 @@
'5.6' => array(
'php' => array(
'base_name' => 'php:5.6-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'mysql', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.5.5', 'memcached-2.2.0' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'mysql', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.5.5', 'memcached-2.2.0', 'imagick-3.4.4' ),
'composer' => true,
),
'phpunit' => 5,
Expand All @@ -93,9 +93,9 @@
'7.0' => array(
'php' => array(
'base_name' => 'php:7.0-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3', 'imagick' ),
'composer' => true,
),
'phpunit' => 6,
Expand All @@ -107,9 +107,9 @@
'7.1' => array(
'php' => array(
'base_name' => 'php:7.1-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3', 'imagick' ),
'composer' => true,
),
'phpunit' => 7,
Expand All @@ -121,9 +121,9 @@
'7.2' => array(
'php' => array(
'base_name' => 'php:7.2-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3', 'imagick' ),
'composer' => true,
),
'phpunit' => 7,
Expand All @@ -135,9 +135,9 @@
'7.3' => array(
'php' => array(
'base_name' => 'php:7.3-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.7.2', 'memcached-3.1.3', 'imagick' ),
'composer' => true,
),
'phpunit' => 7,
Expand All @@ -149,9 +149,9 @@
'7.4' => array(
'php' => array(
'base_name' => 'php:7.4-rc-fpm',
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip' ),
'pecl_extensions' => array( 'xdebug-2.8.0beta1', 'memcached-3.1.3' ),
'apt' => array( 'libjpeg-dev', 'libpng-dev', 'libzip-dev', 'libmemcached-dev', 'unzip', 'libmagickwand-dev', 'ghostscript' ),
'extensions' => array( 'gd', 'opcache', 'mysqli', 'zip', 'exif' ),
'pecl_extensions' => array( 'xdebug-2.8.0beta1', 'memcached-3.1.3', 'imagick' ),
'composer' => true,
),
'phpunit' => 7,
Expand Down Expand Up @@ -250,7 +250,13 @@
$command .= " \\\n";
}

return "$command\tpecl install $extension;";
$command .= "\tpecl install $extension;";

if ( 0 === strpos( $extension, 'imagick' ) ) {
$command .= " \\\n\tdocker-php-ext-enable imagick;";
}

return $command;
}, '' );
}

Expand Down

0 comments on commit d15a119

Please sign in to comment.