php stuff added

This commit is contained in:
Shihaam Abdul Rahman 2022-10-07 16:10:23 +05:00
parent d09c313cda
commit addbedd664
Signed by: shihaam
GPG Key ID: 3B007D22E5584980

View File

@ -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"]