Skip to content

Commit

Permalink
Added a Docker env to run tests in a fresh env
Browse files Browse the repository at this point in the history
  • Loading branch information
nhalstead committed Oct 12, 2020
1 parent d3e2ba8 commit d9cf46f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Run the tests in docker
FROM php:7.4

RUN apt-get update -y
RUN apt-get install -y openssl zip unzip git iputils-ping libpng-dev libzip-dev
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN mkdir -p /home/app
WORKDIR /home/app
ADD . /home/app

RUN composer install

CMD ./vendor/bin/phpunit tests; sleep 10
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.2'
volumes:
logs:
driver: local
vendor:
driver: local
services:
app_server:
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile
tty: true

0 comments on commit d9cf46f

Please sign in to comment.