symfony_example_app/Dockerfile.fpm

26 lines
933 B
Docker

FROM php:8.3-fpm
RUN apt-get update && apt-get install -y unzip libzip-dev && rm -rf /var/cache/apt/*
RUN curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
opentelemetry-php/ext-opentelemetry@main opcache zip grpc intl
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
RUN composer self-update
RUN usermod -a -G www-data root
RUN mkdir -p /var/www/html
RUN chown -R www-data:www-data /var/www/html
WORKDIR /var/www/html/
COPY composer.json composer.lock /var/www/html
COPY config /var/www/html/config
COPY bin /var/www/html/bin
COPY public /var/www/html/public
COPY src /var/www/html/src
COPY templates /var/www/html/templates
COPY src /var/www/html/src
# TODO: prod .env (type_of_image arg)
COPY .env /var/www/html
WORKDIR /var/www/html
RUN chmod a+x bin
RUN composer install
# TODO: check-me