Add 'sshpass' and 'ping' packages into 'workspace' and 'php-fpm' Docker image (#2164)

* Update env-example
Added variables to install 'ping' and 'sshpass'
* Update docker-compose.yml
Import variable from '.env' to set 'INSTALL_MYSQL_CLIENT' and 'INSTALL_PING'
* Update Dockerfile
Add code to import variables from 'docker-compose.yml' to install 'ping' and/or 'sshpass'
This commit is contained in:
vlauciani 2019-06-06 05:59:13 +02:00 committed by Shao Yu-Lung (Allen)
parent c0a36a5a4d
commit 5bf8be6303
4 changed files with 60 additions and 0 deletions

View File

@ -102,6 +102,8 @@ services:
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
- INSTALL_IONCUBE=${WORKSPACE_INSTALL_IONCUBE}
- INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT}
- INSTALL_PING=${WORKSPACE_INSTALL_PING}
- INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS}
- PUID=${WORKSPACE_PUID}
- PGID=${WORKSPACE_PGID}
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
@ -177,6 +179,8 @@ services:
- INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA}
- INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES}
- INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT}
- INSTALL_PING=${PHP_FPM_INSTALL_PING}
- INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS}
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
- INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
- http_proxy

View File

@ -133,6 +133,8 @@ WORKSPACE_INSTALL_TAINT=false
WORKSPACE_INSTALL_LIBPNG=false
WORKSPACE_INSTALL_IONCUBE=false
WORKSPACE_INSTALL_MYSQL_CLIENT=false
WORKSPACE_INSTALL_PING=false
WORKSPACE_INSTALL_SSHPASS=false
WORKSPACE_INSTALL_INOTIFY=false
WORKSPACE_INSTALL_FSWATCH=false
WORKSPACE_PUID=1000
@ -184,6 +186,8 @@ PHP_FPM_INSTALL_APCU=false
PHP_FPM_INSTALL_YAML=false
PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false
PHP_FPM_INSTALL_MYSQL_CLIENT=false
PHP_FPM_INSTALL_PING=false
PHP_FPM_INSTALL_SSHPASS=false
PHP_FPM_FFMPEG=false
PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8"

View File

@ -686,6 +686,32 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get -y install mysql-client \
;fi
###########################################################################
# ping:
###########################################################################
USER root
ARG INSTALL_PING=false
RUN if [ ${INSTALL_PING} = true ]; then \
apt-get update -yqq && \
apt-get -y install inetutils-ping \
;fi
###########################################################################
# sshpass:
###########################################################################
USER root
ARG INSTALL_SSHPASS=false
RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get update -yqq && \
apt-get -y install sshpass \
;fi
###########################################################################
# FFMPEG:
###########################################################################

View File

@ -1006,6 +1006,32 @@ RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \
apt-get -y install mysql-client \
;fi
###########################################################################
# ping:
###########################################################################
USER root
ARG INSTALL_PING=false
RUN if [ ${INSTALL_PING} = true ]; then \
apt-get update -yqq && \
apt-get -y install inetutils-ping \
;fi
###########################################################################
# sshpass:
###########################################################################
USER root
ARG INSTALL_SSHPASS=false
RUN if [ ${INSTALL_SSHPASS} = true ]; then \
apt-get update -yqq && \
apt-get -y install sshpass \
;fi
###########################################################################
# FFMpeg:
###########################################################################