In a script, I need to check:
a) Is the docker engine running? b) Given a container name, is that docker container running?
[the initial wording of this
For OS X users (Mojave 10.14.3)
Here is what i use in my Bash script to test if Docker is running or not
# Check if docker is running if ! docker info >/dev/null 2>&1; then echo "Docker does not seem to be running, run it first and retry" exit 1 fi