Dockerfile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM php:8.2-fpm-alpine
  2. # Install required dependencies and Nginx
  3. RUN apk update && \
  4. apk add --no-cache \
  5. freetype-dev \
  6. libjpeg-turbo-dev \
  7. libpng-dev \
  8. libzip-dev \
  9. icu-dev \
  10. libgd \
  11. libwebp-dev \
  12. nginx \
  13. openssh-client \
  14. unzip \
  15. supervisor && \
  16. docker-php-ext-configure gd --with-freetype --with-jpeg && \
  17. docker-php-ext-configure intl && \
  18. docker-php-ext-install -j$(nproc) gd pdo_mysql zip intl mysqli && \
  19. apk del --no-cache freetype-dev libjpeg-turbo-dev libpng-dev && \
  20. mkdir -p /run/nginx
  21. # Copy PHP-FPM and Nginx configuration files
  22. COPY rootfs/php-fpm.conf /usr/local/etc/php-fpm.d/zz-zcustom.conf
  23. COPY rootfs/nginx.conf /etc/nginx/http.d/default.conf
  24. # Set working directory
  25. WORKDIR /var/www/html
  26. # Set up proper permissions
  27. RUN chown -R www-data:www-data /var/www/html
  28. # Expose the required ports
  29. EXPOSE 80
  30. # Copy and run the supervisord configuration
  31. COPY rootfs/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  32. CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]