Add new docker_image language type.

`docker_image` is intended to be a lightweight hook type similar to system /
script which allows one to use an existing docker image which provides a
hook.
This commit is contained in:
Anthony Sottile 2017-09-02 19:49:23 -07:00
parent 491b90548f
commit 9c3bbecab8
10 changed files with 63 additions and 28 deletions

View file

@ -202,8 +202,8 @@ class LocalRepository(Repository):
def _cmd_runner_from_deps(self, language_name, deps):
"""local repositories have a cmd runner per hook"""
language = languages[language_name]
# pcre / script / system do not have environments so they work out
# of the current directory
# pcre / script / system / docker_image do not have environments so
# they work out of the current directory
if language.ENVIRONMENT_DIR is None:
return PrefixedCommandRunner(git.get_root())
else: