diff --git a/Dockerfile b/Dockerfile index 31978a4..4308254 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -# Use the specified base image + +#FROM php:8.1.22-fpm-alpine3.16 AS base FROM php:8.1.28-fpm-alpine3.18 AS base # Install necessary packages @@ -26,7 +27,11 @@ RUN mkdir -p /run/nginx && \ mkdir -p /var/www/html && \ chown -R www-data:www-data /var/www/html -# Set the working directory +# Add non root user to the tty group, so we can write to stdout and stderr +RUN addgroup www-data tty + +# Set the working directory and user +USER www-data WORKDIR /var/www/html # Add a test PHP file