image optimizers libraries

This commit is contained in:
Ujjwal Ojha 2017-07-08 16:43:05 +05:45
parent ca5a1ee674
commit 9dda2f6b9f
8 changed files with 76 additions and 0 deletions

View File

@ -32,6 +32,7 @@ services:
- INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER} - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER}
- INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW} - INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW}
- INSTALL_MC=${WORKSPACE_INSTALL_MC} - INSTALL_MC=${WORKSPACE_INSTALL_MC}
- INSTALL_IMAGE_OPTIMIZERS=${WORKSPACE_INSTALL_IMAGE_OPTIMIZERS}
- PUID=${WORKSPACE_PUID} - PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID} - PGID=${WORKSPACE_PGID}
- NODE_VERSION=${WORKSPACE_NODE_VERSION} - NODE_VERSION=${WORKSPACE_NODE_VERSION}
@ -75,6 +76,7 @@ services:
- INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT} - INSTALL_GHOSTSCRIPT=${PHP_FPM_INSTALL_GHOSTSCRIPT}
- 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}
dockerfile: "Dockerfile-${PHP_VERSION}" dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from: volumes_from:
- applications - applications

View File

@ -45,6 +45,7 @@ WORKSPACE_INSTALL_LARAVEL_INSTALLER=false
WORKSPACE_INSTALL_DEPLOYER=false WORKSPACE_INSTALL_DEPLOYER=false
WORKSPACE_INSTALL_LINUXBREW=false WORKSPACE_INSTALL_LINUXBREW=false
WORKSPACE_INSTALL_MC=false WORKSPACE_INSTALL_MC=false
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
WORKSPACE_PUID=1000 WORKSPACE_PUID=1000
WORKSPACE_PGID=1000 WORKSPACE_PGID=1000
WORKSPACE_NODE_VERSION=stable WORKSPACE_NODE_VERSION=stable
@ -71,6 +72,7 @@ PHP_FPM_INSTALL_INTL=false
PHP_FPM_INSTALL_GHOSTSCRIPT=false 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
### NGINX ############################################################################################################## ### NGINX ##############################################################################################################

View File

@ -258,6 +258,17 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
docker-php-ext-enable mssql pdo pdo_dblib \ docker-php-ext-enable mssql pdo pdo_dblib \
;fi ;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get update -yqq && \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -282,6 +282,17 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \ && docker-php-ext-enable pdo_sqlsrv sqlsrv \
;fi ;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get update -yqq && \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -289,6 +289,17 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \ && docker-php-ext-enable pdo_sqlsrv sqlsrv \
;fi ;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get update -yqq && \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -425,6 +425,19 @@ RUN if [ ${INSTALL_MC} = true ]; then\
chmod +x /usr/local/bin/mc \ chmod +x /usr/local/bin/mc \
;fi ;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
if [ ${INSTALL_NODE} = true ]; then \
. ~/.bashrc && npm install -g svgo \
;fi\
;fi
USER laradock USER laradock
# #

View File

@ -530,6 +530,19 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
;fi ;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
if [ ${INSTALL_NODE} = true ]; then \
. ~/.bashrc && npm install -g svgo \
;fi\
;fi
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# Final Touch # Final Touch

View File

@ -533,6 +533,19 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \
;fi ;fi
#####################################
# Image optimizers:
#####################################
USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false
ENV INSTALL_IMAGE_OPTIMIZERS ${INSTALL_IMAGE_OPTIMIZERS}
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
if [ ${INSTALL_NODE} = true ]; then \
. ~/.bashrc && npm install -g svgo \
;fi\
;fi
USER laradock USER laradock
# #