Skip to content

Commit c7ffcd3

Browse files
author
Sergei Kasatkin
authored
Merge pull request #60 from omnilight/docker
Setup docker to simplify running tests locally
2 parents bb19640 + c924a57 commit c7ffcd3

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
vendor
2+
.idea
3+
.dockerignore
4+
.git*
5+
.travis.yml
6+
composer.lock
7+
docker-compose.yml
8+
Dockerfile

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM composer
2+
3+
FROM php:5.4-cli
4+
5+
RUN apt-get update && \
6+
apt-get install -y \
7+
git \
8+
unzip
9+
10+
RUN docker-php-ext-install mbstring
11+
12+
COPY --from=composer /usr/bin/composer /usr/bin/composer
13+
14+
RUN composer global require hirak/prestissimo
15+
16+
WORKDIR /app
17+
18+
COPY composer.json .
19+
20+
RUN composer install --prefer-dist --no-interaction --no-ansi
21+
22+
COPY . .

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
docker_build = (docker-compose build)
2+
3+
build:
4+
$(call docker_build)
5+
6+
test:
7+
$(call docker_build) && docker-compose run app composer run-script test

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: '3'
2+
3+
services:
4+
app:
5+
build: .

0 commit comments

Comments
 (0)