Merge branch 'build_prune' of https://github.com/The-Loeki/docker-py into The-Loeki-build_prune

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2018-04-25 16:14:37 -07:00
commit d893a7644f
1 changed files with 16 additions and 0 deletions

View File

@ -305,6 +305,22 @@ class BuildApiMixin(object):
else:
log.debug('No auth config found')
@utils.minimum_version('1.31')
def prune_build(self):
"""
Delete builder cache
Returns:
(dict): A dict containing
the amount of disk space reclaimed in bytes.
Raises:
:py:class:`docker.errors.APIError`
If the server returns an error.
"""
url = self._url("/build/prune")
return self._result(self._post(url), True)
def process_dockerfile(dockerfile, path):
if not dockerfile: