Skip to content

Commit a03bf74

Browse files
committed
Add a warning + check to make sure docker is installed
1 parent 8e20b60 commit a03bf74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

repo2docker/docker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
Docker container engine for repo2docker
33
"""
44

5-
import subprocess
5+
import shutil
66
import tarfile
77
import tempfile
8-
from queue import Empty, Queue
9-
from threading import Thread
108

119
from iso8601 import parse_date
1210
from traitlets import Dict
@@ -101,6 +99,8 @@ def build(
10199
platform=None,
102100
**kwargs,
103101
):
102+
if not shutil.which("docker"):
103+
raise RuntimeError("The docker commandline client must be installed")
104104
args = ["docker", "buildx", "build", "--progress", "plain", "--load"]
105105
if buildargs:
106106
for k, v in buildargs.items():

0 commit comments

Comments
 (0)