From 84d46278f75a8fa7e36883340207bd3253c9928c Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Thu, 28 Sep 2023 17:48:25 +0200 Subject: [PATCH] Add docker test environment --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ docker-compose.yml | 9 +++++++++ 2 files changed, 44 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..f3471b6cc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM php:8-cli + +RUN apt update \ + && apt install -y \ + libpng-dev \ + libicu-dev \ + libpq-dev \ + libzip-dev \ + zip \ + zlib1g-dev \ + locales \ + locales-all \ + libmagickwand-dev \ + libwebp-dev \ + && pecl install imagick \ + && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ + && docker-php-ext-enable imagick \ + && docker-php-ext-install \ + intl \ + opcache \ + pdo \ + pdo_pgsql \ + pdo_mysql \ + pgsql \ + fileinfo \ + mysqli \ + gd \ + bcmath \ + exif \ + zip \ + && apt-get clean + +# install composer +# +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..75a62748d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' + +services: + tests: + build: ./ + working_dir: /project + command: bash -c "composer install && ./vendor/bin/phpunit -vvv" + volumes: + - ./:/project