adrema/.docker/php.Dockerfile

35 lines
1.1 KiB
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-20 16:57:30 +02:00
RUN npm install && npm run prod && npm run img && rm -R node_modules
2022-06-10 02:00:46 +02:00
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
2023-07-19 12:57:58 +02:00
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 texlive-fonts-extra
2023-07-20 20:28:19 +02:00
RUN docker-php-ext-install pdo_mysql curl gd exif intl mbstring pcntl
2023-05-15 19:48:37 +02:00
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-24 17:34:38 +02:00
RUN usermod -s /bin/bash www-data
2023-07-20 22:58:51 +02:00
2023-07-21 11:28:45 +02:00
USER www-data
RUN php artisan telescope:publish
RUN php artisan horizon:publish
USER root
2023-07-24 17:34:38 +02:00
COPY ./.docker/php /bin
2023-07-20 22:58:51 +02:00
2023-07-20 23:19:59 +02:00
VOLUME ["/app/packages/laravel-nami/.cookies", "/app/storage/app"]
2022-06-10 02:00:46 +02:00
EXPOSE 9000
2022-11-22 14:39:13 +01:00
2023-07-20 22:58:51 +02:00
CMD /bin/php-entrypoint