From addbedd664cae2043e08346e2fee608224f38381 Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Fri, 7 Oct 2022 16:10:23 +0500 Subject: [PATCH] php stuff added --- Dockerfile | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 33f926b..fb721ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,20 +22,49 @@ RUN apt install zip unzip git gnupg2 ca-certificates lsb-release apt-transport-h && apt auto-remove -y \ && apt clean -y -#Adding Repo and installing PHP -RUN apt update \ - && wget https://packages.sury.org/php/apt.gpg \ - && apt-key add apt.gpg \ - && rm apt.gpg \ - && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php7.list -RUN apt update \ - && bash -c 'apt install -y php${PHPVERSION} php${PHPVERSION}-{fpm,cli,bcmath,bz2,intl,gd,mbstring,mysql,zip,common,dom,curl} --no-install-recommends' - # Installing nginx -RUN apt update -y \ - && apt install nginx -y --no-install-recommends \ +RUN apt install nginx -y --no-install-recommends \ && apt auto-remove -y \ && apt clean -y +# Installing redis +RUN apt install redis -y --no-install-recommends \ + && apt auto-remove -y \ + && apt clean -y + +#Adding Repo +RUN wget https://packages.sury.org/php/apt.gpg \ + && apt-key add apt.gpg \ + && rm apt.gpg \ + && echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list + +#Installing PHP and Modules +RUN apt install php${PHPVERSION} -y --no-install-recommends + +#Installing Required PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{ctype,curl,dom,gd,json,libxml,mbstring,openssl,posix,session,simplexml,xmlreader,xmlwriter,zip,zlib} --no-install-recommends' + +#Installing database connector PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{pdo_mysql} --no-install-recommends' + +#Installing recommended PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{fileinfo,bz2,intl} --no-install-recommends' + +#Installing Optional Specific app PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{gmp,exif} --no-install-recommends' +#Installing Optional server performance enhancement PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{apcu,memcached,redit} --no-install-recommends' + +#Installing optional PHP modules and tools for preview generation #Maybe add LibreOffice here +RUN bash -c 'apt install -y php${PHPVERSION}-{imagick} imagick ffmpeg libreoffice --no-install-recommends' +#Installing Optional server performance enhancement PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{apcu,memcached,redis} --no-install-recommends' + +#Installing Optional cli enhancement PHP Modules +RUN bash -c 'apt install -y php${PHPVERSION}-{pcntl} --no-install-recommends' + + + + CMD ["bash"]