feat(pre-commit): add support for Docker
Add a docker service to the pre-commit job and appropriate variables to allow pre-commit jobs to use docker images should they desire.
Since this change involves adding a before_script, future-proof
ourselves against jobs wanting to customise the before_script section
of the config by making pre-commit into a template job. This means
that jobs can extend before_script using !reference tags.
An example of a run of pre-commit using this template can be found at https://gitlab.developers.cam.ac.uk/uis/devops/infra/terraform/gcp-cloud-run-app/-/jobs/1288371.
Closes #62 (closed)
Edited by Dr Rich Wareham