diff --git a/docker/client.py b/docker/client.py index 4ff91d84..6b7c6cca 100644 --- a/docker/client.py +++ b/docker/client.py @@ -406,6 +406,8 @@ class Client(requests.Session): elif path.startswith(('http://', 'https://', 'git://', 'github.com/')): remote = path + elif not os.path.isdir(path): + raise TypeError("You must specify a directory to build in path") else: dockerignore = os.path.join(path, '.dockerignore') exclude = None