Skip to content

Commit f422877

Browse files
authored
Add git to Dockerfile to allow running tests (#5987)
1 parent a2694bb commit f422877

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎CONTRIBUTING.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,22 @@ Do you want to **contribute a failing test**? [This tutorial will show you how](
4848

4949
We would be happy to accept PRs that follow these guidelines.
5050

51+
### Using Docker
52+
53+
A `docker-compose.yml` file is provided to make it easier to run the CI checks locally.
54+
To use it, you need to have Docker installed on your machine, then you can build the image and execute the
55+
above commands in a docker container:
56+
57+
```bash
58+
# Build the docker image
59+
docker compose build
60+
61+
# Run the entire CI suite
62+
compose compose run php complete-check
63+
64+
# Fix the coding standards
65+
docker compose run php fix-cs
66+
```
67+
5168
## Repository layout
5269
Documentation goes into `build/target-repository/docs`.

‎Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ FROM php:8-cli-alpine
33
WORKDIR /etc/rector
44

55
# required for composer patches
6-
RUN apk add --no-cache patch
6+
RUN apk add --no-cache patch git
77

88
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
99

1010
RUN mkdir -p /etc/rector
11+
RUN git config --global --add safe.directory /etc/rector

0 commit comments

Comments
 (0)