76 lines
2.6 KiB
Docker
76 lines
2.6 KiB
Docker
FROM debian:11-slim
|
|
WORKDIR /root
|
|
|
|
ARG NEXTCLOUD_VESION=1
|
|
ARG PHPVERSION=8.1
|
|
|
|
#Initial update packges
|
|
RUN apt update && apt upgrade
|
|
|
|
# Language setup
|
|
ENV LANG en_US.UTF-8
|
|
ENV LANGUAGE en_US:en
|
|
ENV LC_ALL en_US.UTF-8
|
|
RUN apt install locales -y \
|
|
&& apt auto-remove -y \
|
|
&& apt clean -y
|
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
|
|
&& locale-gen
|
|
|
|
# Installing basic tools
|
|
RUN apt install zip unzip git gnupg2 ca-certificates lsb-release apt-transport-https wget curl nano vim -y --no-install-recommends \
|
|
&& apt auto-remove -y \
|
|
&& apt clean -y
|
|
|
|
# Installing and configuring nginx
|
|
RUN apt install nginx -y --no-install-recommends \
|
|
&& apt auto-remove -y \
|
|
&& apt clean -y \
|
|
&& rm -v /etc/nginx/sites-enabled/default /var/www/html/index.nginx-debian.html
|
|
COPY buildfiles/nextcloud_nginx.conf /etc/nginx/sites-available/
|
|
RUN ln -s /etc/nginx/sites-available/nextcloud_nginx.conf /etc/nginx/sites-enabled/
|
|
|
|
# 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 \
|
|
&& apt update
|
|
|
|
#Installing and configure PHP
|
|
RUN apt install php${PHPVERSION} -y --no-install-recommends \
|
|
&& mkdir /run/php/
|
|
|
|
#Installing Required PHP Modules
|
|
RUN bash -c 'apt install -y php${PHPVERSION}-{fpm,cli,bcmath,bz2,intl,common,ctype,curl,dom,gd,mbstring,posix,simplexml,xmlreader,xmlwriter,zip} --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"]
|