Added --force-rm to compose build.
It's a flag passed to docker build that removes the intermediate containers left behind on fail builds. Signed-off-by: Adrian Budau <budau.adi@gmail.com>
This commit is contained in:
parent
0017f43d7f
commit
c5c36d8b00
10 changed files with 48 additions and 5 deletions
|
|
@ -701,7 +701,7 @@ class Service(object):
|
|||
cgroup_parent=cgroup_parent
|
||||
)
|
||||
|
||||
def build(self, no_cache=False, pull=False):
|
||||
def build(self, no_cache=False, pull=False, force_rm=False):
|
||||
log.info('Building %s' % self.name)
|
||||
|
||||
path = self.options['build']
|
||||
|
|
@ -715,6 +715,7 @@ class Service(object):
|
|||
tag=self.image_name,
|
||||
stream=True,
|
||||
rm=True,
|
||||
forcerm=force_rm,
|
||||
pull=pull,
|
||||
nocache=no_cache,
|
||||
dockerfile=self.options.get('dockerfile', None),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue