Docker image to run pre-commit on Python apps/libraries
fake_python_module | ||
.gitignore | ||
.pre-commit-config.yaml | ||
.pre-commit-pylint | ||
Dockerfile | ||
README.md |
Docker image to run pre-commit on Python apps/libraries
Debian stable based image with common dependencies to run pre-commit
on Python apps/libraries:
- common python packages:
python3-all python3-dev python3-pip python3-venv pylint
build-essential
to allow local python package usingpip
pre-commit
andgit
commands- pre-install
pre-commit
environments forruff
,pyupgrade
,black
,isort
,flake8
,codespell
,yamllint
,prettier
,pylint
andbandit
.
To use it:
docker run \
-it --rm \
-v "$(pwd)":/src -w /src \
brenard/python-pre-commit \
pre-commit run --all-files
Note: an example .pre-commit-config.yaml
file is provided with Docker image source.
To test it on your project, use to following command:
docker run \
-it --rm \
-v "$(pwd)":/src -w /src \
-v "$(pwd)/.pre-commit-config.yaml":/src/.pre-commit-config.yaml \
brenard/python-pre-commit \
pre-commit run --all-files