Update Dockerfile

shleeable-patch-1
Shlee 2 months ago committed by GitHub
parent 54a743e9af
commit f2db3fcf02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,12 +1,9 @@
FROM serversideup/php:8.4-fpm-nginx
FROM serversideup/php:8.4-frankenphp
# Set working directory
WORKDIR /var/www/html
# Switch to root to install packages
USER root
# Install system dependencies and PHP extensions
RUN apt-get update && apt-get install -y \
ffmpeg \
unzip \
@ -20,7 +17,6 @@ RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions using the built-in helper
RUN install-php-extensions \
bcmath \
curl \
@ -36,20 +32,16 @@ RUN install-php-extensions \
vips \
ffi
# Copy application files
COPY --chown=www-data:www-data . /var/www/html
# Set proper permissions
RUN chown -R www-data:www-data /var/www/html \
&& find /var/www/html -type f -exec chmod 644 {} \; \
&& find /var/www/html -type d -exec chmod 755 {} \; \
&& chmod -R ug+rwx /var/www/html/storage /var/www/html/bootstrap/cache
# Install composer dependencies
RUN composer install --no-ansi --no-interaction --optimize-autoloader
# Switch back to www-data user
USER www-data
# Expose port 8080 (default for serversideup/php)
EXPOSE 8080
EXPOSE 8443

Loading…
Cancel
Save