-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from omnilight/docker
Setup docker to simplify running tests locally
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: . |