From e8c9e6e3f2e49c28ab744bb738fa2c8bf7fe7ff3 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Mon, 15 Dec 2014 15:23:25 -0800 Subject: [PATCH] Added forcerm param in Client.build --- docker/client.py | 4 +++- docs/api.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/client.py b/docker/client.py index bb27a145..6bd6d913 100644 --- a/docker/client.py +++ b/docker/client.py @@ -408,7 +408,8 @@ class Client(requests.Session): def build(self, path=None, tag=None, quiet=False, fileobj=None, nocache=False, rm=False, stream=False, timeout=None, - custom_context=False, encoding=None, pull=True): + custom_context=False, encoding=None, pull=True, + forcerm=False): remote = context = headers = None if path is None and fileobj is None: raise TypeError("Either path or fileobj needs to be provided.") @@ -442,6 +443,7 @@ class Client(requests.Session): 'q': quiet, 'nocache': nocache, 'rm': rm, + 'forcerm': forcerm, 'pull': pull } diff --git a/docs/api.md b/docs/api.md index b49c0d59..d62fc512 100644 --- a/docs/api.md +++ b/docs/api.md @@ -59,6 +59,7 @@ build output as it happens * custom_context (bool): Optional if using `fileobj` * encoding (str): The encoding for a stream. Set to `gzip` for compressing * pull (bool): Downloads any updates to the FROM image in Dockerfiles +* forcerm (bool): Always remove intermediate containers, even after unsuccessful builds **Returns** (generator): A generator of the build output