mirror of
https://github.com/opdavies/build-configs.git
synced 2025-01-23 10:37:31 +00:00
37 lines
557 B
Docker
37 lines
557 B
Docker
FROM php:8.1-cli-bullseye AS base
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
RUN which composer && composer -V
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PATH="${PATH}:/app/vendor/bin"
|
|
|
|
COPY composer.* ./
|
|
|
|
|
|
################################################################################
|
|
|
|
FROM base AS build
|
|
|
|
|
|
RUN apt-get update -yqq \
|
|
&& apt-get install -yqq --no-install-recommends \
|
|
git unzip
|
|
|
|
|
|
RUN composer install
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
FROM base AS test
|
|
|
|
COPY . .
|
|
|
|
RUN phpunit --testdox
|
|
|
|
|