Skip to content

Commit 4077b17

Browse files
committed
check docker is running before all
1 parent 43ec9af commit 4077b17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doxycannon.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import argparse
33
import glob
44
import os
5+
import sys
56
import re
67
from threading import Thread
78
from queue import Queue
@@ -52,7 +53,11 @@
5253
backend doxycannon
5354
"""
5455

55-
doxy = docker.from_env()
56+
try:
57+
doxy = docker.from_env()
58+
except docker.errors.DockerException as err:
59+
print("Unable to contact local Docker daemon. Is it running?")
60+
sys.exit(1)
5661

5762

5863
def build(image_name, path='.'):

0 commit comments

Comments
 (0)