2024-04-04 17:00:00 +00:00
|
|
|
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
|
|
|
|
2024-04-15 06:51:52 +00:00
|
|
|
FROM php:8.2-apache AS base
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
RUN which composer && composer -V
|
|
|
|
|
|
|
|
ARG DOCKER_UID=1000
|
|
|
|
ENV DOCKER_UID="${DOCKER_UID}"
|
|
|
|
|
2024-04-04 18:11:33 +00:00
|
|
|
WORKDIR /var/www/html
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
RUN adduser --disabled-password --uid "${DOCKER_UID}" app \
|
2024-04-04 18:11:33 +00:00
|
|
|
&& chown app:app -R /var/www/html
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
USER app
|
|
|
|
|
2024-04-04 18:11:33 +00:00
|
|
|
ENV PATH="${PATH}:/var/www/html/bin:/var/www/html/vendor/bin"
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
COPY --chown=app:app composer.* ./
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
2024-04-04 18:11:33 +00:00
|
|
|
RUN a2enmod rewrite
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
RUN apt-get update -yqq \
|
|
|
|
&& apt-get install -yqq --no-install-recommends \
|
|
|
|
git libpng-dev libjpeg-dev libzip-dev mariadb-client unzip \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
|
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
RUN docker-php-ext-configure gd --with-jpeg
|
|
|
|
|
2024-04-14 11:10:34 +00:00
|
|
|
RUN docker-php-ext-install gd opcache pdo_mysql zip
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
COPY --chown=app:app phpunit.xml* ./
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USER app
|
|
|
|
|
|
|
|
RUN composer validate --strict
|
|
|
|
RUN composer install --quiet --no-progress
|
|
|
|
|
|
|
|
COPY --chown=app:app tools/docker/images/php/root /
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-php"]
|
2024-04-04 18:11:33 +00:00
|
|
|
CMD ["apache2-foreground"]
|
2024-04-04 17:00:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|