diff options
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 18 | ||||
-rw-r--r-- | Dockerfile.dev | 17 |
2 files changed, 35 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8a4ad25 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# User-facing Dockerfile. For development, see Dockerfile.dev and ./run_tests.sh -h + +# To lint your current working directory: +# docker run --ulimit nofile=1024 -v $(pwd):/repo jorisroovers/gitlint + +# With arguments: +# docker --ulimit nofile=1024 run -v $(pwd):/repo jorisroovers/gitlint --debug --ignore T1 + +# NOTE: --ulimit is required to work around a limitation in Docker +# Details: https://github.com/jorisroovers/gitlint/issues/129 + +FROM python:3.11.0-alpine +ARG GITLINT_VERSION + +RUN apk add git +RUN pip install gitlint==$GITLINT_VERSION + +ENTRYPOINT ["gitlint", "--target", "/repo"] diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..5cd1739 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,17 @@ +# Note: development using the local Dockerfile is still work-in-progress +# Getting started: http://jorisroovers.github.io/gitlint/contributing/ +ARG python_version_dotted + +FROM python:${python_version_dotted}-stretch + +RUN apt-get update +# software-properties-common contains 'add-apt-repository' +RUN apt-get install -y git silversearcher-ag jq curl + +ADD . /gitlint +WORKDIR /gitlint + +RUN pip install --ignore-requires-python -r requirements.txt +RUN pip install --ignore-requires-python -r test-requirements.txt + +CMD ["/bin/bash"] |