Skip to content

Commit

Permalink
Merge pull request #60 from omnilight/docker
Browse files Browse the repository at this point in the history
Setup docker to simplify running tests locally
  • Loading branch information
Sergei Kasatkin authored Mar 31, 2020
2 parents bb19640 + c924a57 commit c7ffcd3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vendor
.idea
.dockerignore
.git*
.travis.yml
composer.lock
docker-compose.yml
Dockerfile
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 . .
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: '3'

services:
app:
build: .

0 comments on commit c7ffcd3

Please sign in to comment.