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

Method inspect_container

docker/api/container.py:778–795  ·  view source on GitHub ↗

Identical to the `docker inspect` command, but only for containers. Args: container (str): The container to inspect Returns: (dict): Similar to the output of `docker inspect`, but as a single dict Raises: :py:class:`

(self, container)

Source from the content-addressed store, hash-verified

776
777 @utils.check_resource('container')
778 def inspect_container(self, container):
779 """
780 Identical to the `docker inspect` command, but only for containers.
781
782 Args:
783 container (str): The container to inspect
784
785 Returns:
786 (dict): Similar to the output of `docker inspect`, but as a
787 single dict
788
789 Raises:
790 :py:class:`docker.errors.APIError`
791 If the server returns an error.
792 """
793 return self._result(
794 self._get(self._url("/containers/{0}/json", container)), True
795 )
796
797 @utils.check_resource('container')
798 def kill(self, container, signal=None):

Calls 3

_resultMethod · 0.80
_getMethod · 0.80
_urlMethod · 0.80