Docker compose to run test
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM php:7.4-cli
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
unzip \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN composer install
|
||||
|
||||
ENTRYPOINT ["vendor/bin/phpunit"]
|
||||
|
||||
10
README.md
10
README.md
@@ -1 +1,9 @@
|
||||
Example for presentation.
|
||||
Example for presentation.
|
||||
|
||||
---
|
||||
|
||||
Running tests with docker compose
|
||||
|
||||
```sh
|
||||
docker compose run --build readable-example
|
||||
```
|
||||
|
||||
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
readable-example:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: readable-example
|
||||
working_dir: /app
|
||||
Reference in New Issue
Block a user