| 12345678910111213141516171819202122232425262728293031323334353637 |
- FROM php:8.2-fpm-alpine
- # Install required dependencies and Nginx
- RUN apk update && \
- apk add --no-cache \
- freetype-dev \
- libjpeg-turbo-dev \
- libpng-dev \
- libzip-dev \
- icu-dev \
- libgd \
- libwebp-dev \
- nginx \
- unzip \
- supervisor && \
- docker-php-ext-configure gd --with-freetype --with-jpeg && \
- docker-php-ext-configure intl && \
- docker-php-ext-install -j$(nproc) gd pdo_mysql zip intl mysqli && \
- apk del --no-cache freetype-dev libjpeg-turbo-dev libpng-dev && \
- mkdir -p /run/nginx
- # Copy PHP-FPM and Nginx configuration files
- COPY rootfs/php-fpm.conf /usr/local/etc/php-fpm.d/zz-zcustom.conf
- COPY rootfs/nginx.conf /etc/nginx/http.d/default.conf
- # Set working directory
- WORKDIR /var/www/html
- # Set up proper permissions
- RUN chown -R www-data:www-data /var/www/html
- # Expose the required ports
- EXPOSE 80
- # Copy and run the supervisord configuration
- COPY rootfs/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
- CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|