30 lines
1002 B
Docker
30 lines
1002 B
Docker
FROM php:8.3-fpm-bookworm
|
|
|
|
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
|
|
RUN apt install -y nginx git zip unzip libzip-dev
|
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
|
|
RUN docker-php-ext-install gd zip
|
|
|
|
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"] |