A containerized environment for running bats tests and/or shellcheck against bash scripts.
- bats for running
.bats
tests - shellcheck for running
shellcheck
against bash scripts - jq
Mount the host directory containing your bash scripts
dir and bats
tests
dir and then simply supply the appropriate bats
/shellcheck
command to run:
$ docker run --rm \
--volume /path/to/dir:/workdir \
--workdir /workdir \
deiscc/shell-dev:latest \
bats tests
$ docker run --rm \
--volume /path/to/dir:/workdir \
--workdir /workdir \
deiscc/shell-dev:latest \
shellcheck scripts/*
The latest deis/shell-dev Docker image is available at:
- Docker Hub
docker pull deiscc/shell-dev