#!/usr/bin/bash -eu # PODNAME: githooks-docker.sh # ABSTRACT: Manage Docker images and containers to run Git::Hooks # Specify the Git::Hooks module version (https://metacpan.org/pod/Git::Hooks). # By default it groks the version from the Git::Hooks installed in your # system. If you don't have it installed, you can replace the value by a static # version string, such as '3.3.1'. GITHOOKS_VERSION=$(perl -MGit::Hooks -E 'say $Git::Hooks::VERSION') # Specify the Docker Perl tag (https://hub.docker.com/_/perl) PERL_IMAGE_TAG=5.36-bullseye # Set to "sudo" if you need to invoke docker with sudo. SUDO= # You shouldn't need to change the following variables DOCKER_IMAGE_NAME=git-hooks DOCKER_IMAGE=$DOCKER_IMAGE_NAME:$GITHOOKS_VERSION USRHOME=$HOME USRID=$(id -u) USRNAME=$(id -un) GRPID=$(id -g) GRPNAME=$(id -gn) error() { cat >&2 <