Update build configuration files
This commit is contained in:
parent
e917e41d01
commit
13945dcaec
8 changed files with 180 additions and 23 deletions
53
Dockerfile
Normal file
53
Dockerfile
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
FROM php: AS base
|
||||
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
RUN which composer && composer -V
|
||||
|
||||
ARG DOCKER_UID=1000
|
||||
ENV DOCKER_UID="${DOCKER_UID}"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN adduser --disabled-password --uid "${DOCKER_UID}" app \
|
||||
&& chown app:app -R /app
|
||||
|
||||
USER app
|
||||
|
||||
ENV PATH="${PATH}:/app/bin:/app/vendor/bin"
|
||||
|
||||
COPY --chown=app:app composer.* ./
|
||||
|
||||
################################################################################
|
||||
|
||||
FROM base AS build
|
||||
|
||||
USER root
|
||||
|
||||
|
||||
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
|
||||
|
||||
RUN docker-php-ext-install gd opcache pdo_mysql zip
|
||||
|
||||
COPY --chown=app:app phpunit.xml* ./
|
||||
|
||||
|
||||
|
||||
USER app
|
||||
|
||||
|
||||
COPY --chown=app:app tools/docker/images/php/root /
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint-php"]
|
||||
CMD ["php-fpm"]
|
||||
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue