diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccd777ddf7f..659aef39e1e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,5 +48,22 @@ Do you want to **contribute a failing test**? [This tutorial will show you how]( We would be happy to accept PRs that follow these guidelines. +### Using Docker + +A `docker-compose.yml` file is provided to make it easier to run the CI checks locally. +To use it, you need to have Docker installed on your machine, then you can build the image and execute the +above commands in a docker container: + +```bash +# Build the docker image +docker compose build + +# Run the entire CI suite +compose compose run php complete-check + +# Fix the coding standards +docker compose run php fix-cs +``` + ## Repository layout Documentation goes into `build/target-repository/docs`. diff --git a/Dockerfile b/Dockerfile index b8511e95781..4626674410d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,9 @@ FROM php:8-cli-alpine WORKDIR /etc/rector # required for composer patches -RUN apk add --no-cache patch +RUN apk add --no-cache patch git COPY --from=composer:2 /usr/bin/composer /usr/bin/composer RUN mkdir -p /etc/rector +RUN git config --global --add safe.directory /etc/rector