mirror of https://github.com/rectorphp/rector.git
Minimal Docker runtime (#998)
* Minimal Docker runtime Allow contributors work on the code without actual PHP8 on their computers. * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md * Update CONTRIBUTING.md Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
This commit is contained in:
parent
f5c1f19b54
commit
2acce0ab9b
|
@ -18,3 +18,6 @@ box.phar
|
|||
php-parallel-lint
|
||||
|
||||
tmp
|
||||
|
||||
# Allow overrides for Docker configuration (custom volumes, env variables etc)
|
||||
docker-compose.override.yml
|
||||
|
|
|
@ -2,7 +2,20 @@
|
|||
|
||||
Contributions here are more than welcomed! You can contribute to [rector-src](https://github.com/rectorphp/rector-src) repository.
|
||||
|
||||
There 3 rules will highly increase changes to get your PR merged:
|
||||
### Preparing Local Environment
|
||||
|
||||
If you have PHP 8 and Composer installed locally you can use it straight away. You can validate your environment with:
|
||||
|
||||
```bash
|
||||
composer check-platform-reqs
|
||||
|
||||
Alternatively you can use Docker runtime. All you need to do is wrap every command with `docker-compose run php`, so commands will be executed inside Docker container.
|
||||
|
||||
For example `docker-compose run php composer install` will download PHP dependencies, so you can start using all scripts and work with the code.
|
||||
|
||||
### Preparing Pull Request
|
||||
|
||||
There 3 rules will highly increase chance to get your PR merged:
|
||||
|
||||
- **1 feature per pull-request**
|
||||
- **new features need tests**
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
FROM php:8-cli-alpine
|
||||
|
||||
WORKDIR /etc/rector
|
||||
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
RUN mkdir -p /etc/rector
|
|
@ -0,0 +1,7 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
php:
|
||||
build: .
|
||||
volumes:
|
||||
- .:/etc/rector
|
Loading…
Reference in New Issue