public sealed class Container : IMessage<Container>, IEquatable<Container>, IDeepCloneable<Container>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Run Admin v2 API class Container.
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.
Implements
IMessageContainer, IEquatableContainer, IDeepCloneableContainer, IBufferMessage, IMessageNamespace
Google.Cloud.Run.V2Assembly
Google.Cloud.Run.V2.dll
Constructors
Container()
public Container()
Container(Container)
public Container(Container other)
Parameter | |
---|---|
Name | Description |
other | Container |
Properties
Args
public RepeatedField<string> Args { get; }
Arguments to the entrypoint. The docker image's CMD is used if this is not provided.
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
Command
public RepeatedField<string> Command { get; }
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.
Property Value | |
---|---|
Type | Description |
RepeatedFieldstring |
Env
public RepeatedField<EnvVar> Env { get; }
List of environment variables to set in the container.
Property Value | |
---|---|
Type | Description |
RepeatedFieldEnvVar |
Image
public string Image { get; set; }
Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.
Property Value | |
---|---|
Type | Description |
string |
LivenessProbe
public Probe LivenessProbe { get; set; }
Periodic probe of container liveness. Container will be restarted if the probe fails.
Property Value | |
---|---|
Type | Description |
Probe |
Name
public string Name { get; set; }
Name of the container specified as a DNS_LABEL (RFC 1123).
Property Value | |
---|---|
Type | Description |
string |
Ports
public RepeatedField<ContainerPort> Ports { get; }
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.
Property Value | |
---|---|
Type | Description |
RepeatedFieldContainerPort |
Resources
public ResourceRequirements Resources { get; set; }
Compute Resource requirements by this container.
Property Value | |
---|---|
Type | Description |
ResourceRequirements |
StartupProbe
public Probe StartupProbe { get; set; }
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.
Property Value | |
---|---|
Type | Description |
Probe |
VolumeMounts
public RepeatedField<VolumeMount> VolumeMounts { get; }
Volume to mount into the container's filesystem.
Property Value | |
---|---|
Type | Description |
RepeatedFieldVolumeMount |
WorkingDir
public string WorkingDir { get; set; }
Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
Property Value | |
---|---|
Type | Description |
string |