Skip to content

Commit 6ca0b68

Browse files
committed
Update docker test runner
1 parent f0bab17 commit 6ca0b68

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ RUN apt update \
1212

1313
# install composer
1414
COPY --from=composer /usr/bin/composer /usr/bin/composer
15+
16+
# setup entrypoint
17+
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
18+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ services:
44
tests:
55
build: ./
66
working_dir: /project
7-
command: bash -c "composer install && ./vendor/bin/phpunit"
7+
entrypoint: ["/usr/local/bin/entrypoint.sh", "./vendor/bin/phpunit"]
88
volumes:
99
- ./:/project

entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
set -e
3+
4+
composer install --quiet
5+
6+
exec "$@"

0 commit comments

Comments
 (0)