2023-06-27 20:21:55 +00:00
|
|
|
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
2023-03-14 20:20:48 +00:00
|
|
|
|
2024-08-04 12:04:23 +00:00
|
|
|
FROM php:8.3-fpm-bullseye AS base
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
RUN which composer && composer -V
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
ARG DOCKER_UID=1000
|
|
|
|
ENV DOCKER_UID="${DOCKER_UID}"
|
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
RUN adduser --disabled-password --uid "${DOCKER_UID}" app \
|
|
|
|
&& chown app:app -R /app
|
|
|
|
|
|
|
|
USER app
|
2023-01-21 15:50:45 +00:00
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
ENV PATH="${PATH}:/app/bin:/app/vendor/bin"
|
|
|
|
|
|
|
|
COPY --chown=app:app composer.* ./
|
2023-01-21 15:50:45 +00:00
|
|
|
|
|
|
|
################################################################################
|
2022-07-12 22:35:26 +00:00
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
USER root
|
|
|
|
|
2023-06-05 22:02:34 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
RUN apt-get update -yqq \
|
|
|
|
&& apt-get install -yqq --no-install-recommends \
|
2023-10-08 16:33:53 +00:00
|
|
|
git libpng-dev libjpeg-dev libzip-dev mariadb-client unzip \
|
2023-10-08 16:33:06 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man \
|
|
|
|
&& apt-get clean
|
2023-06-05 22:02:34 +00:00
|
|
|
|
|
|
|
RUN docker-php-ext-configure gd --with-jpeg
|
2023-01-21 15:50:45 +00:00
|
|
|
|
2024-05-10 21:55:28 +00:00
|
|
|
RUN docker-php-ext-install gd opcache pdo_mysql zip
|
2023-01-21 15:50:45 +00:00
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
COPY --chown=app:app phpunit.xml* ./
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
USER app
|
2023-01-21 15:50:45 +00:00
|
|
|
|
|
|
|
RUN composer validate
|
|
|
|
RUN composer install
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
COPY --chown=app:app tools/docker/images/php/root /
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-php"]
|
|
|
|
CMD ["php-fpm"]
|
|
|
|
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-03-14 20:20:48 +00:00
|
|
|
|
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
################################################################################
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
FROM nginx:1 as web
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
EXPOSE 8080
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
WORKDIR /app
|
2022-07-12 22:35:26 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
COPY tools/docker/images/web/root /
|