| RUN \ | RUN \ | ||||
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | ||||
| apt-get update && \ | apt-get update && \ | ||||
| apt-get install -y wget bzip2 vim rsync mariadb-client cron sudo php7.4-imagick php7.4-gmp php7.4-intl && \ | |||||
| apt-get install -y wget bzip2 vim rsync mariadb-client cron sudo php8.2-imagick php8.2-gmp php8.2-intl && \ | |||||
| apt-get clean | apt-get clean | ||||
| # Change upload-limits and -sizes | # Change upload-limits and -sizes | ||||
| RUN sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 2048M/g" /etc/php/7.4/fpm/php.ini && \ | |||||
| sed -i "s/post_max_size = 8M/post_max_size =root123 2048M/g" /etc/php/7.4/fpm/php.ini && \ | |||||
| echo 'default_charset = "UTF-8"' >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "upload_tmp_dir = ${NEXTCLOUD_DATA_PATH}" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "extension = apc.so" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "apc.enabled = 1" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "apc.include_once_override = 0" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "apc.shm_size = 256" >> /etc/php/7.4/fpm/php.ini | |||||
| RUN sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 2048M/g" /etc/php/8.2/fpm/php.ini && \ | |||||
| sed -i "s/post_max_size = 8M/post_max_size =root123 2048M/g" /etc/php/8.2/fpm/php.ini && \ | |||||
| echo 'default_charset = "UTF-8"' >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "upload_tmp_dir = ${NEXTCLOUD_DATA_PATH}" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "extension = apc.so" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "apc.enabled = 1" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "apc.include_once_override = 0" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "apc.shm_size = 256" >> /etc/php/8.2/fpm/php.ini | |||||
| # now add our hand-written nginx-default-configuration which makes use of all the stuff so far prepared | # now add our hand-written nginx-default-configuration which makes use of all the stuff so far prepared | ||||
| COPY default /etc/nginx/sites-available/default | COPY default /etc/nginx/sites-available/default | ||||
| # PHP config | # PHP config | ||||
| COPY php_nc.ini /tmp/php_nc.ini | COPY php_nc.ini /tmp/php_nc.ini | ||||
| RUN cat /tmp/php_nc.ini >> /etc/php/7.4/fpm/php.ini && \ | |||||
| cat /tmp/php_nc.ini >> /etc/php/7.4/cli/php.ini | |||||
| RUN cat /tmp/php_nc.ini >> /etc/php/8.2/fpm/php.ini && \ | |||||
| cat /tmp/php_nc.ini >> /etc/php/8.2/cli/php.ini | |||||
| # https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html#php-fpm-tips-label | # https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html#php-fpm-tips-label | ||||
| RUN sed -i 's/^;env/env/g' /etc/php/7.4/fpm/pool.d/www.conf | |||||
| RUN sed -i 's/^;env/env/g' /etc/php/8.2/fpm/pool.d/www.conf | |||||
| # https://github.com/nextcloud/vm/issues/2039#issuecomment-876204446 | # https://github.com/nextcloud/vm/issues/2039#issuecomment-876204446 | ||||
| RUN echo "" >> /etc/php/7.4/mods-available/apcu.ini | |||||
| RUN echo "apc.enable_cli=1" >> /etc/php/7.4/mods-available/apcu.ini | |||||
| RUN echo "" >> /etc/php/8.2/mods-available/apcu.ini | |||||
| RUN echo "apc.enable_cli=1" >> /etc/php/8.2/mods-available/apcu.ini | |||||
| # Create the data-directory where NEXTCLOUD can store its stuff | # Create the data-directory where NEXTCLOUD can store its stuff | ||||
| RUN mkdir -p "${NEXTCLOUD_DATA_PATH}" && \ | RUN mkdir -p "${NEXTCLOUD_DATA_PATH}" && \ | ||||
| #VOLUME ${NEXTCLOUD_BACKUP_PATH} | #VOLUME ${NEXTCLOUD_BACKUP_PATH} | ||||
| ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||||
| CMD service php7.4-fpm start && nginx | |||||
| #CMD ["service", "php7.4-fpm", "start", "&&", "nginx"] | |||||
| CMD service php8.2-fpm start && nginx | |||||
| #CMD ["service", "php8.2-fpm", "start", "&&", "nginx"] |
| RUN \ | RUN \ | ||||
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | ||||
| apt-get update && \ | apt-get update && \ | ||||
| apt-get install -y wget bzip2 vim rsync mariadb-client cron sudo php7.4-imagick php7.4-gmp php7.4-intl && \ | |||||
| apt-get install -y wget bzip2 vim rsync mariadb-client cron sudo php8.2-imagick php8.2-gmp php8.2-intl && \ | |||||
| apt-get clean | apt-get clean | ||||
| # Change upload-limits and -sizes | # Change upload-limits and -sizes | ||||
| RUN sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 2048M/g" /etc/php/7.4/fpm/php.ini && \ | |||||
| sed -i "s/post_max_size = 8M/post_max_size =root123 2048M/g" /etc/php/7.4/fpm/php.ini && \ | |||||
| echo 'default_charset = "UTF-8"' >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "upload_tmp_dir = ${NEXTCLOUD_DATA_PATH}" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "extension = apc.so" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "apc.enabled = 1" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "apc.include_once_override = 0" >> /etc/php/7.4/fpm/php.ini && \ | |||||
| echo "apc.shm_size = 256" >> /etc/php/7.4/fpm/php.ini | |||||
| RUN sed -i "s/upload_max_filesize = 2M/upload_max_filesize = 2048M/g" /etc/php/8.2/fpm/php.ini && \ | |||||
| sed -i "s/post_max_size = 8M/post_max_size =root123 2048M/g" /etc/php/8.2/fpm/php.ini && \ | |||||
| echo 'default_charset = "UTF-8"' >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "upload_tmp_dir = ${NEXTCLOUD_DATA_PATH}" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "extension = apc.so" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "apc.enabled = 1" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "apc.include_once_override = 0" >> /etc/php/8.2/fpm/php.ini && \ | |||||
| echo "apc.shm_size = 256" >> /etc/php/8.2/fpm/php.ini | |||||
| # now add our hand-written nginx-default-configuration which makes use of all the stuff so far prepared | # now add our hand-written nginx-default-configuration which makes use of all the stuff so far prepared | ||||
| COPY default /etc/nginx/sites-available/default | COPY default /etc/nginx/sites-available/default | ||||
| # PHP config | # PHP config | ||||
| COPY php_nc.ini /tmp/php_nc.ini | COPY php_nc.ini /tmp/php_nc.ini | ||||
| RUN cat /tmp/php_nc.ini >> /etc/php/7.4/fpm/php.ini && \ | |||||
| cat /tmp/php_nc.ini >> /etc/php/7.4/cli/php.ini | |||||
| RUN cat /tmp/php_nc.ini >> /etc/php/8.2/fpm/php.ini && \ | |||||
| cat /tmp/php_nc.ini >> /etc/php/8.2/cli/php.ini | |||||
| # https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html#php-fpm-tips-label | # https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html#php-fpm-tips-label | ||||
| RUN sed -i 's/^;env/env/g' /etc/php/7.4/fpm/pool.d/www.conf | |||||
| RUN sed -i 's/^;env/env/g' /etc/php/8.2/fpm/pool.d/www.conf | |||||
| # https://github.com/nextcloud/vm/issues/2039#issuecomment-876204446 | # https://github.com/nextcloud/vm/issues/2039#issuecomment-876204446 | ||||
| RUN echo "" >> /etc/php/7.4/mods-available/apcu.ini | |||||
| RUN echo "apc.enable_cli=1" >> /etc/php/7.4/mods-available/apcu.ini | |||||
| RUN echo "" >> /etc/php/8.2/mods-available/apcu.ini | |||||
| RUN echo "apc.enable_cli=1" >> /etc/php/8.2/mods-available/apcu.ini | |||||
| # Create the data-directory where NEXTCLOUD can store its stuff | # Create the data-directory where NEXTCLOUD can store its stuff | ||||
| RUN mkdir -p "${NEXTCLOUD_DATA_PATH}" && \ | RUN mkdir -p "${NEXTCLOUD_DATA_PATH}" && \ | ||||
| #VOLUME ${NEXTCLOUD_BACKUP_PATH} | #VOLUME ${NEXTCLOUD_BACKUP_PATH} | ||||
| ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||||
| CMD service php7.4-fpm start && nginx | |||||
| #CMD ["service", "php7.4-fpm", "start", "&&", "nginx"] | |||||
| CMD service php8.2-fpm start && nginx | |||||
| #CMD ["service", "php8.2-fpm", "start", "&&", "nginx"] |
| fastcgi_param SCRIPT_FILENAME $document_root$1; | fastcgi_param SCRIPT_FILENAME $document_root$1; | ||||
| fastcgi_param PATH_INFO $2; | fastcgi_param PATH_INFO $2; | ||||
| fastcgi_param HTTPS on; | fastcgi_param HTTPS on; | ||||
| fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |||||
| fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; | |||||
| fastcgi_param PHP_VALUE "memory_limit = 512M"; | fastcgi_param PHP_VALUE "memory_limit = 512M"; | ||||
| } | } | ||||
| location ~ \.php$ { | location ~ \.php$ { | ||||
| try_files $uri =404; | try_files $uri =404; | ||||
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||||
| fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |||||
| fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; | |||||
| fastcgi_index index.php; | fastcgi_index index.php; | ||||
| fastcgi_param PHP_VALUE "memory_limit = 512M"; | fastcgi_param PHP_VALUE "memory_limit = 512M"; | ||||
| include fastcgi_params; | include fastcgi_params; |
| FROM bingen/amd64-nginx | FROM bingen/amd64-nginx | ||||
| # Add PHP 7.4 repo | |||||
| # Add PHP repo | |||||
| RUN apt-get update && \ | RUN apt-get update && \ | ||||
| apt-get install -y apt-transport-https lsb-release ca-certificates wget && \ | apt-get install -y apt-transport-https lsb-release ca-certificates wget && \ | ||||
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | ||||
| # update and install php | # update and install php | ||||
| RUN apt-get update && \ | RUN apt-get update && \ | ||||
| apt-get install -y --allow-unauthenticated \ | apt-get install -y --allow-unauthenticated \ | ||||
| php7.4 php7.4-fpm php-pear php7.4-common \ | |||||
| php7.4-mysql php7.4-cli php7.4-gd php7.4-curl php7.4-apcu php7.4-opcache \ | |||||
| php7.4-mbstring php7.4-ldap php7.4-zip php7.4-intl php7.4-imagick \ | |||||
| php7.4-bcmath php7.4-xml && \ | |||||
| php8.2 php8.2-fpm php-pear php8.2-common \ | |||||
| php8.2-mysql php8.2-cli php8.2-gd php8.2-curl php8.2-apcu php8.2-opcache \ | |||||
| php8.2-mbstring php8.2-ldap php8.2-zip php8.2-intl php8.2-imagick \ | |||||
| php8.2-bcmath php8.2-xml && \ | |||||
| apt-get clean | apt-get clean | ||||
| # overwrite the default-configuration with our own settings - enabling PHP | # overwrite the default-configuration with our own settings - enabling PHP | ||||
| COPY default /etc/nginx/sites-available/default | COPY default /etc/nginx/sites-available/default | ||||
| CMD service php7.4-fpm start && nginx | |||||
| CMD service php8.2-fpm start && nginx |
| FROM bingen/ARCH_PLACEHOLDER-nginx | FROM bingen/ARCH_PLACEHOLDER-nginx | ||||
| # Add PHP 7.4 repo | |||||
| # Add PHP repo | |||||
| RUN apt-get update && \ | RUN apt-get update && \ | ||||
| apt-get install -y apt-transport-https lsb-release ca-certificates wget && \ | apt-get install -y apt-transport-https lsb-release ca-certificates wget && \ | ||||
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \ | ||||
| # update and install php | # update and install php | ||||
| RUN apt-get update && \ | RUN apt-get update && \ | ||||
| apt-get install -y --allow-unauthenticated \ | apt-get install -y --allow-unauthenticated \ | ||||
| php7.4 php7.4-fpm php-pear php7.4-common \ | |||||
| php7.4-mysql php7.4-cli php7.4-gd php7.4-curl php7.4-apcu php7.4-opcache \ | |||||
| php7.4-mbstring php7.4-ldap php7.4-zip php7.4-intl php7.4-imagick \ | |||||
| php7.4-bcmath php7.4-xml && \ | |||||
| php8.2 php8.2-fpm php-pear php8.2-common \ | |||||
| php8.2-mysql php8.2-cli php8.2-gd php8.2-curl php8.2-apcu php8.2-opcache \ | |||||
| php8.2-mbstring php8.2-ldap php8.2-zip php8.2-intl php8.2-imagick \ | |||||
| php8.2-bcmath php8.2-xml && \ | |||||
| apt-get clean | apt-get clean | ||||
| # overwrite the default-configuration with our own settings - enabling PHP | # overwrite the default-configuration with our own settings - enabling PHP | ||||
| COPY default /etc/nginx/sites-available/default | COPY default /etc/nginx/sites-available/default | ||||
| CMD service php7.4-fpm start && nginx | |||||
| CMD service php8.2-fpm start && nginx |
| # fastcgi_split_path_info ^(.+\.php)(/.+)$; | # fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||||
| # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini | # # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini | ||||
| # | # | ||||
| # # With php7.4-cgi alone: | |||||
| # # With php8.2-cgi alone: | |||||
| # fastcgi_pass 127.0.0.1:9000; | # fastcgi_pass 127.0.0.1:9000; | ||||
| # # With php7.4-fpm: | |||||
| # fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |||||
| # # With php8.2-fpm: | |||||
| # fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; | |||||
| # fastcgi_index index.php; | # fastcgi_index index.php; | ||||
| # include fastcgi_params; | # include fastcgi_params; | ||||
| #} | #} | ||||
| location ~ \.php$ { | location ~ \.php$ { | ||||
| try_files $uri =404; | try_files $uri =404; | ||||
| fastcgi_split_path_info ^(.+\.php)(/.+)$; | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||||
| fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; | |||||
| fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; | |||||
| fastcgi_index index.php; | fastcgi_index index.php; | ||||
| fastcgi_param PHP_VALUE "memory_limit = 512M"; | fastcgi_param PHP_VALUE "memory_limit = 512M"; | ||||
| include fastcgi_params; | include fastcgi_params; |