Check for docker support being installed
This commit is contained in:
parent
b36226573b
commit
6eb6b54f26
@ -18,6 +18,11 @@ _docker_client_instance = None
|
|||||||
|
|
||||||
|
|
||||||
def _docker_client():
|
def _docker_client():
|
||||||
|
if not docker:
|
||||||
|
# check docker is actually installed and give a message with the resolution
|
||||||
|
# when it isn't.
|
||||||
|
raise RuntimeError("You need to install docker from PyPI to use these utensils!")
|
||||||
|
|
||||||
global _docker_client_instance
|
global _docker_client_instance
|
||||||
if not _docker_client_instance:
|
if not _docker_client_instance:
|
||||||
_docker_client_instance = docker.from_env()
|
_docker_client_instance = docker.from_env()
|
||||||
|
Loading…
Reference in New Issue
Block a user