diff options
| author | Ronald van Zantvoort <the.loeki@gmail.com> | 2018-02-24 13:07:29 +0100 |
|---|---|---|
| committer | Joffrey F <f.joffrey@gmail.com> | 2018-04-25 17:55:16 -0700 |
| commit | 8b5f281e0031b37484e10ec646698fd403f275ce (patch) | |
| tree | fb88db9332e387183fe2ca038a76eb5ff3ac67e2 | |
| parent | d2d998281b5b94ac2b214719ed19037d7ba3a18c (diff) | |
| download | docker-py-8b5f281e0031b37484e10ec646698fd403f275ce.tar.gz | |
build_prune
Signed-off-by: Ronald van Zantvoort <the.loeki@gmail.com>
| -rw-r--r-- | docker/api/build.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docker/api/build.py b/docker/api/build.py index d69985e..32328ab 100644 --- a/docker/api/build.py +++ b/docker/api/build.py @@ -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: |
