DiplomGenerator/Dockerfile

30 lines
1002 B
Docker
Raw Permalink Normal View History

2024-06-19 21:52:32 +02:00
FROM php:8.3-fpm-bookworm
2023-10-16 17:07:43 +02:00
ARG user
ARG uid
COPY .docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENV DEBIAN_FRONTEND noninteractive
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list.d/*
RUN apt update
# https://github.com/docker-library/docs/tree/master/php#php-core-extensions
# IDK if this is necessary, but probably doesn't hurt
RUN apt install -y ttf-mscorefonts-installer libfreetype-dev libjpeg62-turbo-dev libpng-dev
2024-06-19 21:52:32 +02:00
RUN apt install -y nginx git zip unzip libzip-dev
2023-10-16 17:07:43 +02:00
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
2024-06-19 21:52:32 +02:00
RUN docker-php-ext-install gd zip
2023-10-16 17:07:43 +02:00
COPY .docker/nginx/diplom.conf /etc/nginx/sites-enabled/default
ENV FONT_LOCATION /usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY . /var/www/html
WORKDIR /var/www/html
RUN composer install --no-interaction --no-plugins --no-scripts --prefer-dist
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]