@@ -264,6 +264,23 @@ def build(self, path=None, tag=None, quiet=False, fileobj=None,
264
264
265
265
return self ._stream_helper (response , decode = decode )
266
266
267
+ @utils .minimum_version ('1.31' )
268
+ def prune_builds (self ):
269
+ """
270
+ Delete the builder cache
271
+
272
+ Returns:
273
+ (dict): A dictionary containing information about the operation's
274
+ result. The ``SpaceReclaimed`` key indicates the amount of
275
+ bytes of disk space reclaimed.
276
+
277
+ Raises:
278
+ :py:class:`docker.errors.APIError`
279
+ If the server returns an error.
280
+ """
281
+ url = self ._url ("/build/prune" )
282
+ return self ._result (self ._post (url ), True )
283
+
267
284
def _set_auth_headers (self , headers ):
268
285
log .debug ('Looking for auth config' )
269
286
@@ -305,22 +322,6 @@ def _set_auth_headers(self, headers):
305
322
else :
306
323
log .debug ('No auth config found' )
307
324
308
- @utils .minimum_version ('1.31' )
309
- def prune_build (self ):
310
- """
311
- Delete builder cache
312
-
313
- Returns:
314
- (dict): A dict containing
315
- the amount of disk space reclaimed in bytes.
316
-
317
- Raises:
318
- :py:class:`docker.errors.APIError`
319
- If the server returns an error.
320
- """
321
- url = self ._url ("/build/prune" )
322
- return self ._result (self ._post (url ), True )
323
-
324
325
325
326
def process_dockerfile (dockerfile , path ):
326
327
if not dockerfile :
0 commit comments