Class Container (0.8.1)

Container(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.

Attributes

NameDescription
name str
Name of the container specified as a DNS_LABEL (RFC 1123).
image str
Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.
command MutableSequence[str]
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.
args MutableSequence[str]
Arguments to the entrypoint. The docker image's CMD is used if this is not provided.
env MutableSequence[google.cloud.run_v2.types.EnvVar]
List of environment variables to set in the container.
resources google.cloud.run_v2.types.ResourceRequirements
Compute Resource requirements by this container.
ports MutableSequence[google.cloud.run_v2.types.ContainerPort]
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on.
volume_mounts MutableSequence[google.cloud.run_v2.types.VolumeMount]
Volume to mount into the container's filesystem.
working_dir str
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
liveness_probe google.cloud.run_v2.types.Probe
Periodic probe of container liveness. Container will be restarted if the probe fails.
startup_probe google.cloud.run_v2.types.Probe
Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails.