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/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 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: .