This is a docker image containing bats-core and a few other useful bits: jq, make, curl, docker, git
docker run --rm -v $(pwd):/app graze/bats /app/tests
To be able to run docker commands within this container you need to mount the docker sock:
docker run --rm \
-v $(pwd):/app \
-v /var/run/docker.sock:/var/run/docker.sock \
graze/bats /app/tests
@test "entrypoint is bats" {
run bash -c "docker inspect graze/bats:$tag | jq -r '.[].Config.Entrypoint[]'"
echo 'status:' $status
echo 'output:' $output
[ "$status" -eq 0 ]
[ "$output" = "/usr/local/bin/bats" ]
}