adrema/.docker/php.Dockerfile

27 lines
985 B
Docker
Raw Normal View History

2022-06-10 02:00:46 +02:00
FROM composer:2.2.7 as composer
WORKDIR /app
COPY . /app
RUN composer install --ignore-platform-reqs --no-dev
FROM node:17.9.0-slim as node
WORKDIR /app
COPY . /app
2023-07-18 10:02:08 +02:00
2022-06-10 02:00:46 +02:00
RUN npm install && npm run prod && rm -R node_modules
FROM php:8.1.6-fpm as php
2023-05-15 19:48:37 +02:00
WORKDIR /app
2023-07-18 14:18:44 +02:00
RUN apt-get update
RUN apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip
RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended
2023-05-15 19:48:37 +02:00
RUN docker-php-ext-install pdo_mysql curl gd intl mbstring pcntl
RUN pecl install redis && docker-php-ext-enable redis
2022-06-10 02:00:46 +02:00
COPY --chown=www-data:www-data . /app
COPY --chown=www-data:www-data --from=node /app/public /app/public
COPY --chown=www-data:www-data --from=composer /app/vendor /app/vendor
2023-07-18 14:18:44 +02:00
COPY .docker/fonts /usr/local/src/fonts
RUN /usr/local/src/fonts/compile.sh
2022-06-10 02:00:46 +02:00
EXPOSE 9000
2022-11-22 14:39:13 +01:00
2022-06-10 02:00:46 +02:00
CMD ["php-fpm", "-F", "-R", "-O"]