Skip to content

Instantly share code, notes, and snippets.

@szmyty
Created May 29, 2025 20:50
Show Gist options
  • Save szmyty/8602d24c7214f723110128e6a8415191 to your computer and use it in GitHub Desktop.
Save szmyty/8602d24c7214f723110128e6a8415191 to your computer and use it in GitHub Desktop.
version: 3
tasks:
healthcheck:
desc: "Inspect container health status by name"
cmds:
- docker inspect --format='{{json .State.Health}}' "{{.CONTAINER}}" | jq
vars:
CONTAINER:
sh: |
if [ -z "{{.CLI_ARGS}}" ]; then
echo "Error: container name required"; exit 1
fi
echo "{{.CLI_ARGS}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment