docker-python-pre-commit/README.md

18 lines
612 B
Markdown
Raw Normal View History

2023-01-19 14:43:06 +01:00
# Docker image to run pre-commit on Python apps/libraries
Image with common dependencies to run pre-commit in Python apps/libraries:
- common python packages: `python3-all python3-dev python3-pip python3-venv pylint3`
- `build-essential` to allow local python package using `pip`
- `pre-commit` and `git` commands
2023-01-19 14:51:16 +01:00
- pre-install `pre-commit` environments for `pylint`, `pyupgrade`, `black` and `isort`
2023-01-19 14:43:06 +01:00
To use it:
```bash
docker run -it -v "$(pwd)":/src -w /src brenard/python-pre-commit
2023-01-19 14:51:16 +01:00
pre-commit run --all-files
2023-01-19 14:43:06 +01:00
```
2023-01-19 14:53:20 +01:00
**Note:** an example `.pre-commit-config.yaml` file is provided with Docker image source.