Skip to content

Commit c583be7

Browse files
committed
add README
1 parent 79dde43 commit c583be7

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
![CI/CD](https://github.com/kool-dev/docker-phpqa/workflows/CI/CD/badge.svg)
2+
3+
## Description
4+
5+
Minimal PHP QA Docker image focused on loca/CI static analysis, styling and other tools.
6+
7+
It's plays nicely with [kool.dev](https://github.com/kool-dev/kool) managed environments, but can fit in any other PHP use-case.
8+
9+
## Usage
10+
11+
Just execute any QA tool available straight from a new container. Using [`kool`](https://github.com/kool-dev/kool) is the prefered way:
12+
13+
```console
14+
$ cd my-laravel-project/
15+
$ kool docker kooldev/phpqa:7.4 phan
16+
$ kool docker kooldev/phpqa:7.4 php-cs-fixer
17+
```
18+
19+
With vanilla Docker you would need to run:
20+
21+
```
22+
$ docker run --rm --init -it -v $(pwd):/app -w /app kooldev/phpqa:7.4
23+
```
24+
25+
> We strongly recommend checking out [`kool` CLI](https://github.com/kool-dev/kool) for more benefits to your Docker environemnts.
26+
27+
## Available Tags
28+
29+
The image built is [`kooldev/phpqa`](https://hub.docker.com/r/kooldev/phpqa/tags?page=1&ordering=last_updated) with tags:
30+
31+
### 7.4
32+
33+
- [7.4](https://github.com/kool-dev/docker-phpqa/blob/main/7.4/Dockerfile)
34+
35+
## Using kool.yml
36+
37+
Examples of what you can do in a `kool` powered environment. Add to your `kool.yml` file:
38+
39+
```yaml
40+
# kool.yml
41+
scripts:
42+
# just an alias to the PHPQA container
43+
phpqa: kool docker kooldev/phpqa:7.4
44+
# using the alias to call each tool with predefined parameters
45+
# assuming your application code is located in a `app/` folder
46+
phan: kool run phpqa phan --color -p -l app -iy 5
47+
phpcpd: kool run phpqa phpcpd --fuzzy app
48+
# ...
49+
```
50+
51+
## Contributing
52+
53+
Please feel free to use and open a PR with more QA tools you find useful to have! As a sort of roadmap these are the goals in our mind for the short term:
54+
55+
- Make tools specific configurations available for the user in a friendly manner.
56+
- Ship boilerplate of CI snippets for popular engines (Github Actions, CircleCI, TravisCI).
57+
- Add more tools that we find helpful.
58+
59+
60+
### Update images with templates
61+
62+
You should change `fwd-template.json` for configuration and `template/` folder for the actual base templates.
63+
64+
After any changes, we need to run `kool run template` to parse the templates and generate all versions folder/files.
65+
66+
## License
67+
68+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)