forked from Flute-CMS/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (24 loc) · 1.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM php:8.1-fpm
# Устанавливаем зависимости
RUN apt-get update && apt-get install -y libzip-dev libgmp-dev \
libicu-dev zlib1g-dev libpng-dev libjpeg-dev libxml2-dev \
libfreetype6-dev libonig-dev libwebp-dev libjpeg62-turbo-dev \
libxpm-dev libcurl4-openssl-dev pkg-config
# Устанавливаем расширения PHP
RUN docker-php-ext-install -j$(nproc) mysqli pdo pdo_mysql mbstring ctype curl
RUN docker-php-ext-install zip
RUN docker-php-ext-install gmp
RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype
RUN docker-php-ext-install -j$(nproc) gd
RUN docker-php-ext-install -j$(nproc) intl bcmath
RUN apt-get clean
# Hide PHP version
RUN echo "expose_php = Off" > /usr/local/etc/php/conf.d/security.ini
# Устанавливаем рабочий каталог
WORKDIR /var/www/html/
# Установка Composer
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Копируем файлы приложения
COPY . .
RUN chmod -R 775 /var/www/html/storage
CMD bash -c "composer install --ignore-platform-reqs && php-fpm"