Added forcerm param in Client.build

This commit is contained in:
Joffrey F 2014-12-15 15:23:25 -08:00
parent 73b15be0c1
commit e8c9e6e3f2
2 changed files with 4 additions and 1 deletions

View File

@ -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
}

View File

@ -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