Merge pull request #1121 from freearhey/master

Added support of ImageMagick
This commit is contained in:
Mahmoud Zalt 2017-09-06 14:59:29 +03:00 committed by GitHub
commit 801ccd47d2
9 changed files with 75 additions and 3 deletions

View File

@ -37,6 +37,7 @@ services:
- INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY} - INSTALL_SYMFONY=${WORKSPACE_INSTALL_SYMFONY}
- INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON} - INSTALL_PYTHON=${WORKSPACE_INSTALL_PYTHON}
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${WORKSPACE_INSTALL_IMAGEMAGICK}
- PUID=${WORKSPACE_PUID} - PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID} - PGID=${WORKSPACE_PGID}
- NODE_VERSION=${WORKSPACE_NODE_VERSION} - NODE_VERSION=${WORKSPACE_NODE_VERSION}
@ -81,6 +82,7 @@ services:
- INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP} - INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP}
- INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE} - INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE}
- INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS} - INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS}
- INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK}
dockerfile: "Dockerfile-${PHP_VERSION}" dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from: volumes_from:
- applications - applications

View File

@ -50,6 +50,7 @@ WORKSPACE_INSTALL_MC=false
WORKSPACE_INSTALL_SYMFONY=false WORKSPACE_INSTALL_SYMFONY=false
WORKSPACE_INSTALL_PYTHON=false WORKSPACE_INSTALL_PYTHON=false
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
WORKSPACE_INSTALL_IMAGEMAGICK=false
WORKSPACE_PUID=1000 WORKSPACE_PUID=1000
WORKSPACE_PGID=1000 WORKSPACE_PGID=1000
WORKSPACE_NODE_VERSION=stable WORKSPACE_NODE_VERSION=stable
@ -77,6 +78,7 @@ PHP_FPM_INSTALL_GHOSTSCRIPT=false
PHP_FPM_INSTALL_LDAP=false PHP_FPM_INSTALL_LDAP=false
PHP_FPM_INSTALL_SWOOLE=false PHP_FPM_INSTALL_SWOOLE=false
PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false
PHP_FPM_INSTALL_IMAGEMAGICK=false
### NGINX ############################################################################################################## ### NGINX ##############################################################################################################

View File

@ -269,6 +269,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \ apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi ;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get update -y && \
apt-get install -y libmagickwand-dev imagemagick && \
pecl install imagick && \
docker-php-ext-enable imagick \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch
@ -276,7 +289,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
# #
ADD ./laravel.ini /usr/local/etc/php/conf.d ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/ ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/* #RUN rm -r /var/lib/apt/lists/*

View File

@ -293,6 +293,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \ apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi ;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get update -y && \
apt-get install -y libmagickwand-dev imagemagick && \
pecl install imagick && \
docker-php-ext-enable imagick \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch
@ -300,7 +313,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
# #
ADD ./laravel.ini /usr/local/etc/php/conf.d/ ADD ./laravel.ini /usr/local/etc/php/conf.d/
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/ ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/* #RUN rm -r /var/lib/apt/lists/*

View File

@ -300,6 +300,19 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \ apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi ;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get update -y && \
apt-get install -y libmagickwand-dev imagemagick && \
pecl install imagick && \
docker-php-ext-enable imagick \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch
@ -307,7 +320,7 @@ RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
# #
ADD ./laravel.ini /usr/local/etc/php/conf.d ADD ./laravel.ini /usr/local/etc/php/conf.d
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/ ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/
#RUN rm -r /var/lib/apt/lists/* #RUN rm -r /var/lib/apt/lists/*

View File

@ -499,6 +499,16 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
&& pip install --upgrade virtualenv \ && pip install --upgrade virtualenv \
;fi ;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get install -y --force-yes imagemagick php-imagick \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -580,6 +580,16 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
&& pip install --upgrade virtualenv \ && pip install --upgrade virtualenv \
;fi ;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get install -y --force-yes imagemagick php-imagick \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -586,6 +586,15 @@ RUN if [ ${INSTALL_PYTHON} = true ]; then \
&& pip install --upgrade virtualenv \ && pip install --upgrade virtualenv \
;fi ;fi
#####################################
# ImageMagick:
#####################################
USER root
ARG INSTALL_IMAGEMAGICK=false
ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK}
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get install -y --force-yes imagemagick php-imagick \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------