Docker image for Continuous Integrations to check python scripts with code lint and format.
The image is based on official alpine image and add some tools like :
python3pyflakespycodestylepydocstyleblackFROM alpine:latest
RUN apk add --no-cache \
gcc \
musl-dev \
python3-dev \
python3
RUN pip3 install --no-cache-dir --no-compile black && \
pip3 install --no-cache-dir --no-compile pyflakes && \
pip3 install --no-cache-dir --no-compile pycodestyle && \
pip3 install --no-cache-dir --no-compile pydocstyle
RUN find /usr/lib/ -name '__pycache__' -print0 | xargs -0 -n1 rm -rf && \
find /usr/lib/ -name '*.pyc' -print0 | xargs -0 -n1 rm -rf;
ENTRYPOINT []
HEALTHCHECK NONE
CMD []
Be sure docker service is run and :
docker build -t claranet/python-check .
docker run --rm -v $(pwd):/data claranet/python-check:latest black --verbose --check ./script.py
docker run --rm -v $(pwd):/data claranet/python-check:latest pycodestyle ./script.py
docker run --rm -v $(pwd):/data claranet/python-check:latest pydocstyle ./script.py
docker run --rm -v $(pwd):/data claranet/python-check:latest pyflakes ./script.py
Content type
Image
Digest
Size
81.4 MB
Last updated
over 6 years ago
docker pull claranet/python-check