SHA256
1
0
forked from pool/docker
docker/docker_service_helper.sh

23 lines
406 B
Bash

#!/bin/bash
if [ "$1" != "wait" ];then
echo "Usage $0 option"
echo "options can be"
echo " wait: wait for the daemon to start"
exit -1
fi
echo "Waiting for docker daemon to start"
for i in {1..60};do
docker version > /dev/null 2>&1 && break
sleep 1
done
if docker version > /dev/null 2>&1;then
echo "Docker is alive"
exit 0
else
echo "Docker is dead"
exit 1
fi