From d79616c3aed49c9586e18f17375b3c2df9da82e3 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sat, 14 Jul 2018 16:51:51 +0200 Subject: [PATCH] Updated docker configuration --- Dockerfile | 2 ++ README.md | 4 ++-- docker-compose.yml | 2 +- start.sh | 2 ++ test.sh | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 Dockerfile create mode 100644 start.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f9ab413 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM php:7.2.2-apache +RUN docker-php-ext-install mysqli pdo pdo_mysql diff --git a/README.md b/README.md index 932eaba..29fc5bd 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ existing colors. ## start To run the program execute: ```bash - docker-compose up -d + bash ./start.sh ``` ## test To run the tests execute: ```bash - test.sh + bash ./test.sh ``` diff --git a/docker-compose.yml b/docker-compose.yml index 4e668aa..cbf9b43 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: ports: - "9906:3306" web: - image: php:7.2.2-apache + build: . container_name: php_web depends_on: - db diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..2a67cfd --- /dev/null +++ b/start.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker-compose up -d diff --git a/test.sh b/test.sh index 386ea52..239417d 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,2 @@ #!/bin/bash -(cd ./src && php -d memory_limit=128M vendor/bin/phpunit) +docker exec -ti php_web php -d memory_limit=128M vendor/bin/phpunit