upgrade to python3 and php8

This commit is contained in:
Chris 2023-11-19 13:48:47 +01:00
parent 9a2f0e198d
commit 02b41673fd
2 changed files with 6 additions and 5 deletions

View file

@ -1,8 +1,9 @@
FROM alpine:3.14.2
FROM alpine:3.18
LABEL org.opencontainers.image.source = "https://github.com/HaschekSolutions/opentrashmail"
RUN apk add --no-cache bash python2 socat wget php7-fileinfo php7-session curl git php php-curl nginx php-openssl php-mbstring php-json php-gd php-dom php-fpm
RUN apk add --no-cache bash python3 py3-pip socat wget php-fileinfo php-session curl git php php-curl nginx php-openssl php-mbstring php-json php-gd php-dom php-fpm
RUN pip3 install aiosmtpd
#RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
RUN mkdir -p /var/www/opentrashmail
WORKDIR /var/www/opentrashmail
@ -16,7 +17,7 @@ RUN chmod +x /etc/start.sh
ADD docker/rootfs/nginx.conf /etc/nginx/http.d/default.conf
RUN mkdir -p /run/nginx
RUN mkdir -p /var/log/nginx
RUN sed -i 's/nobody/nginx/g' /etc/php7/php-fpm.d/www.conf
RUN sed -i 's/nobody/nginx/g' /etc/php81/php-fpm.d/www.conf
WORKDIR /var/www/opentrashmail

View file

@ -5,7 +5,7 @@ echo 'Starting Open Trashmail'
cd /var/www/opentrashmail
echo ' [+] Starting php'
php-fpm7
php-fpm81
if [[ ${SKIP_FILEPERMISSIONS:=false} != true ]]; then
chown -R nginx:nginx /var/www/
@ -48,4 +48,4 @@ _buildConfig() {
_buildConfig > /var/www/opentrashmail/config.ini
echo ' [+] Starting Mailserver'
su - nginx -s /bin/ash -c 'cd /var/www/opentrashmail/python;python -u mailserver.py >> /var/www/opentrashmail/logs/mailserver.log 2>&1 '
su - nginx -s /bin/ash -c 'cd /var/www/opentrashmail/python;python3 -u mailserver3.py >> /var/www/opentrashmail/logs/mailserver.log 2>&1 '