From 6c43c86a5de1024f53ea17ab259e8bf3dd50ba6a Mon Sep 17 00:00:00 2001 From: Sergei Kasatkin Date: Mon, 30 Mar 2020 23:21:34 +0200 Subject: [PATCH 1/2] Setup docker to simplify running tests locally --- .dockerignore | 8 ++++++++ Dockerfile | 22 ++++++++++++++++++++++ docker-compose.yml | 5 +++++ 3 files changed, 35 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..854f1a8 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +vendor +.idea +.dockerignore +.git* +.travis.yml +composer.lock +docker-compose.yml +Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..205ad5d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM composer + +FROM php:5.4-cli + +RUN apt-get update && \ + apt-get install -y \ + git \ + unzip + +RUN docker-php-ext-install mbstring + +COPY --from=composer /usr/bin/composer /usr/bin/composer + +RUN composer global require hirak/prestissimo + +WORKDIR /app + +COPY composer.json . + +RUN composer install --prefer-dist --no-interaction --no-ansi + +COPY . . diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1502221 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +version: '3' + +services: + app: + build: . From c924a57ffde7a8e9b266e2b7a07e027595410574 Mon Sep 17 00:00:00 2001 From: Sergei Kasatkin Date: Tue, 31 Mar 2020 22:58:46 +0200 Subject: [PATCH 2/2] Add Makefile --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b83f4a6 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +docker_build = (docker-compose build) + +build: + $(call docker_build) + +test: + $(call docker_build) && docker-compose run app composer run-script test