text4u
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. FROM php:8.1-fpm
  2. # Set working directory
  3. WORKDIR /var/www
  4. # Install dependencies
  5. RUN apt-get update && apt-get install -y \
  6. build-essential \
  7. libpng-dev \
  8. libjpeg62-turbo-dev \
  9. libfreetype6-dev \
  10. locales \
  11. zip \
  12. jpegoptim optipng pngquant gifsicle \
  13. vim \
  14. unzip \
  15. git \
  16. curl \
  17. libonig-dev \
  18. libzip-dev \
  19. libxml2-dev
  20. # Clear cache
  21. RUN apt-get clean && rm -rf /var/lib/apt/lists/*
  22. # Install PHP extensions
  23. RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
  24. && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
  25. # Install Composer
  26. COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
  27. # Copy existing application directory contents
  28. COPY . /var/www
  29. # Create storage and bootstrap/cache directories and set permissions
  30. RUN mkdir -p /var/www/storage /var/www/bootstrap/cache \
  31. && chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache \
  32. && chmod -R 775 /var/www/storage /var/www/bootstrap/cache
  33. # Copy existing application directory permissions
  34. COPY --chown=www-data:www-data . /var/www
  35. # Change current user to www
  36. USER www-data
  37. # Expose port 9000 and start php-fpm server
  38. EXPOSE 9000
  39. CMD ["php-fpm"]