2023-05-09 20:32:29 +00:00
|
|
|
# Do not edit this file. It is automatically generated by https://oliverdavies.dev/build-configs.
|
2023-03-14 20:20:48 +00:00
|
|
|
|
2023-01-21 15:50:45 +00:00
|
|
|
FROM php:8.1-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-06-05 22:02:34 +00:00
|
|
|
git libjpeg-dev libpng-dev libzip-dev mariadb-client unzip
|
|
|
|
|
|
|
|
RUN docker-php-ext-configure gd --with-jpeg
|
2023-01-21 15:50:45 +00:00
|
|
|
|
2023-05-09 20:04:02 +00:00
|
|
|
RUN docker-php-ext-install gd 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 /
|