Update Dockerfile

This commit is contained in:
Stefan Pejcic 2024-05-21 15:34:34 +02:00 committed by GitHub
parent 48ece69341
commit 0f62ffb628
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,7 @@ RUN apt-get update && \
add-apt-repository ppa:ondrej/php && \ add-apt-repository ppa:ondrej/php && \
apt-get update && \ apt-get update && \
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
msmtp \
ttyd \ ttyd \
screen \ screen \
apache2 \ apache2 \
@ -90,18 +91,12 @@ RUN mkdir -p /var/log/apache2/domlogs/
RUN sed -i \
-e 's/^upload_max_filesize = .*/upload_max_filesize = 1024M/' \ ########## PHPMYADMIN ##########
-e 's/^max_input_time = .*/max_input_time = 600/' \
-e 's/^memory_limit = .*/memory_limit = -1/' \
-e 's/^post_max_size = .*/post_max_size = 1024M/' \
-e 's/^max_execution_time = .*/max_execution_time = 600/' \
/etc/php/8.2/cli/php.ini
COPY config.inc.php /etc/phpmyadmin/ COPY config.inc.php /etc/phpmyadmin/
COPY pma.php /usr/share/phpmyadmin/pma.php COPY pma.php /usr/share/phpmyadmin/pma.php
# PHPMYADMIN
RUN new_password=$(openssl rand -base64 12 | tr -d '/+' | head -c 16) \ RUN new_password=$(openssl rand -base64 12 | tr -d '/+' | head -c 16) \
&& sed -i "s/\(\$dbpass='.*'\)/\$dbpass='$new_password';/" "/etc/phpmyadmin/config-db.php" \ && sed -i "s/\(\$dbpass='.*'\)/\$dbpass='$new_password';/" "/etc/phpmyadmin/config-db.php" \
&& pma_file="/usr/share/phpmyadmin/pma.php" \ && pma_file="/usr/share/phpmyadmin/pma.php" \
@ -129,9 +124,22 @@ RUN sed -i \
-e 's/^post_max_size = .*/post_max_size = 1024M/' \ -e 's/^post_max_size = .*/post_max_size = 1024M/' \
-e 's/^max_execution_time = .*/max_execution_time = 600/' \ -e 's/^max_execution_time = .*/max_execution_time = 600/' \
-e 's/^opcache.enable= .*/opcache.enable=1/' \ -e 's/^opcache.enable= .*/opcache.enable=1/' \
-e 's/^;sendmail_path = .*/sendmail_path = "/usr/bin/msmtp -t"/' \
/etc/php/8.2/fpm/php.ini /etc/php/8.2/fpm/php.ini
RUN sed -i \
-e 's/^upload_max_filesize = .*/upload_max_filesize = 1024M/' \
-e 's/^max_input_time = .*/max_input_time = 600/' \
-e 's/^memory_limit = .*/memory_limit = -1/' \
-e 's/^post_max_size = .*/post_max_size = 1024M/' \
-e 's/^max_execution_time = .*/max_execution_time = 600/' \
-e 's/^opcache.enable= .*/opcache.enable=1/' \
-e 's/^;sendmail_path = .*/sendmail_path = "/usr/bin/msmtp -t"/' \
/etc/php/8.2/cli/php.ini
########## EMAIL ##########
COPY msmtprc /etc/msmtprc
########## SSH ########## ########## SSH ##########
ENV NOTVISIBLE "in users profile" ENV NOTVISIBLE "in users profile"