container¶
Classes
Container (*args, **kwargs) |
Class representing a container. |
-
class
remoteappmanager.docker.container.
Container
(*args, **kwargs)[source]¶ Bases:
traitlets.traitlets.HasTraits
Class representing a container. Note that its existence just describes a container. It does not imply that the associated container is still running, registered, or anything
-
docker_id
= Unicode¶ The docker id of the container
a unicode string
-
classmethod
from_docker_dict
(docker_dict)[source]¶ Returns a Container object with the info given by a docker Client.
Parameters: docker_dict (dict) – One item from the result of docker.Client.containers Returns: container Return type: remoteappmanager.docker.container.Container Examples
>>> # containers is a list of dict >>> containers = docker.Client().containers()
>>> Container.from_docker_dict(containers[0])
-
host_url
¶ Returns the docker host where this server can be reached, in url form.
-
image_id
= Unicode¶ And the image docker id
a unicode string
-
image_name
= Unicode¶ The image name
a unicode string
-
ip
= Unicode¶ The ip address...
a unicode string
-
mapping_id
= Unicode¶ Mapping identifier
a unicode string
-
name
= Unicode¶ The practical name of the container
a unicode string
-
port
= Int¶ ...and port where the container service will be listening
an int
Default: 80
-
realm
= Unicode¶ a unicode string
-
url_id
= Unicode¶ The id that will go in the URL of the container. This is a de-facto replacement for the container docker id. The reason why we don’t use that instead is because the container id is difficult to obtain reliably from inside the container, and because we want more flexibility in the form of the user-exposed id. Important: must be globally unique, not just per-user unique.
a unicode string
-
urlpath
= Unicode¶ The url path of the container as it is exported to the user. e.g. “/home/test/containers/12345” Must not have an end slash.
a unicode string
-
user
= Unicode¶ The user currently running the container
a unicode string
-