MCPcopy Index your code
hub / github.com/docker/docker-py / remove

Method remove

docker/models/images.py:62–78  ·  view source on GitHub ↗

Remove this image. Args: force (bool): Force removal of the image noprune (bool): Do not delete untagged parents Raises: :py:class:`docker.errors.APIError` If the server returns an error.

(self, force=False, noprune=False)

Source from the content-addressed store, hash-verified

60 return self.client.api.history(self.id)
61
62 def remove(self, force=False, noprune=False):
63 """
64 Remove this image.
65
66 Args:
67 force (bool): Force removal of the image
68 noprune (bool): Do not delete untagged parents
69
70 Raises:
71 :py:class:`docker.errors.APIError`
72 If the server returns an error.
73 """
74 return self.client.api.remove_image(
75 self.id,
76 force=force,
77 noprune=noprune,
78 )
79
80 def save(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE, named=False):
81 """

Callers

nothing calls this directly

Calls 1

remove_imageMethod · 0.80

Tested by

no test coverage detected