MCPcopy
hub / github.com/docker/docker-py / remove_image

Method remove_image

docker/api/image.py:503–514  ·  view source on GitHub ↗

Remove an image. Similar to the ``docker rmi`` command. Args: image (str): The image to remove force (bool): Force removal of the image noprune (bool): Do not delete untagged parents

(self, image, force=False, noprune=False)

Source from the content-addressed store, hash-verified

501
502 @utils.check_resource('image')
503 def remove_image(self, image, force=False, noprune=False):
504 """
505 Remove an image. Similar to the ``docker rmi`` command.
506
507 Args:
508 image (str): The image to remove
509 force (bool): Force removal of the image
510 noprune (bool): Do not delete untagged parents
511 """
512 params = {'force': force, 'noprune': noprune}
513 res = self._delete(self._url("/images/{0}", image), params=params)
514 return self._result(res, True)
515
516 def search(self, term, limit=None):
517 """

Callers 11

tearDownMethod · 0.80
test_pullMethod · 0.80
test_pull_streamingMethod · 0.80
test_removeMethod · 0.80
test_prune_imagesMethod · 0.80
test_remove_imageMethod · 0.80
tearDownMethod · 0.80
removeMethod · 0.80
removeMethod · 0.80

Calls 3

_deleteMethod · 0.80
_urlMethod · 0.80
_resultMethod · 0.80

Tested by 7

test_pullMethod · 0.64
test_pull_streamingMethod · 0.64
test_removeMethod · 0.64
test_prune_imagesMethod · 0.64
test_remove_imageMethod · 0.64