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

Method import_image_from_image

docker/api/image.py:218–232  ·  view source on GitHub ↗

Like :py:meth:`~docker.api.image.ImageApiMixin.import_image`, but only supports importing from another image, like the ``FROM`` Dockerfile parameter. Args: image (str): Image name to import from repository (str): The repository to create

(self, image, repository=None, tag=None,
                                changes=None)

Source from the content-addressed store, hash-verified

216 )
217
218 def import_image_from_image(self, image, repository=None, tag=None,
219 changes=None):
220 """
221 Like :py:meth:`~docker.api.image.ImageApiMixin.import_image`, but only
222 supports importing from another image, like the ``FROM`` Dockerfile
223 parameter.
224
225 Args:
226 image (str): Image name to import from
227 repository (str): The repository to create
228 tag (str): The tag to apply
229 """
230 return self.import_image(
231 image=image, repository=repository, tag=tag, changes=changes
232 )
233
234 @utils.check_resource('image')
235 def inspect_image(self, image):

Callers

nothing calls this directly

Calls 1

import_imageMethod · 0.95

Tested by

no test coverage detected