Container class

Definition

A container instance.

Variables are only populated by the server, and will be ignored when sending a request.

Container(name, image, resources, command=None, ports=None, environment_variables=None, volume_mounts=None)
Inheritance
builtins.object
Container
Parameters
name
str

The user-provided name of the container instance.

image
str

The name of the image used to create the container instance.

command
list[str]

The commands to execute within the container instance in exec form.

ports
list[ContainerPort]

The exposed ports on the container instance.

environment_variables
list[EnvironmentVariable]

The environment variables to set in the container instance.

resources
ResourceRequirements

The resource requirements of the container instance.

volume_mounts
list[VolumeMount]

The volume mounts available to the container instance.

Variables

instance_view
ContainerPropertiesInstanceView
The instance view of the container instance. Only valid in response.