Reference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#args
def
args
()
-
>
::
Array
< ::
String
>
- (::Array<::String>) — Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
#args=
def
args=
(
value
)
-
>
::
Array
< ::
String
>
- value(::Array<::String>) — Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
- (::Array<::String>) — Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
#command
def
command
()
-
>
::
Array
< ::
String
>
- (::Array<::String>) — Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
#command=
def
command=
(
value
)
-
>
::
Array
< ::
String
>
- value(::Array<::String>) — Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
- (::Array<::String>) — Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
#env
def
env
()
-
>
::
Array
< ::
Google
::
Cloud
::
Run
::
V2
::
EnvVar
>
- (::Array< ::Google::Cloud::Run::V2::EnvVar >) — List of environment variables to set in the container.
#env=
def
env=
(
value
)
-
>
::
Array
< ::
Google
::
Cloud
::
Run
::
V2
::
EnvVar
>
- value(::Array< ::Google::Cloud::Run::V2::EnvVar >) — List of environment variables to set in the container.
- (::Array< ::Google::Cloud::Run::V2::EnvVar >) — List of environment variables to set in the container.
#image
def
image
()
-
>
::
String
- (::String) — Required. URL of the Container image in Google Container Registry or Docker More info: https://kubernetes.io/docs/concepts/containers/images
#image=
def
image=
(
value
)
-
>
::
String
- value(::String) — Required. URL of the Container image in Google Container Registry or Docker More info: https://kubernetes.io/docs/concepts/containers/images
- (::String) — Required. URL of the Container image in Google Container Registry or Docker More info: https://kubernetes.io/docs/concepts/containers/images
#name
def
name
()
-
>
::
String
- (::String) — Name of the container specified as a DNS_LABEL.
#name=
def
name=
(
value
)
-
>
::
String
- value(::String) — Name of the container specified as a DNS_LABEL.
- (::String) — Name of the container specified as a DNS_LABEL.
#ports
def
ports
()
-
>
::
Array
< ::
Google
::
Cloud
::
Run
::
V2
::
ContainerPort
>
- (::Array< ::Google::Cloud::Run::V2::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.
#ports=
def
ports=
(
value
)
-
>
::
Array
< ::
Google
::
Cloud
::
Run
::
V2
::
ContainerPort
>
- value(::Array< ::Google::Cloud::Run::V2::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.
- (::Array< ::Google::Cloud::Run::V2::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.
#resources
def
resources
()
-
>
::
Google
::
Cloud
::
Run
::
V2
::
ResourceRequirements
- ( ::Google::Cloud::Run::V2::ResourceRequirements ) — Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
#resources=
def
resources=
(
value
)
-
>
::
Google
::
Cloud
::
Run
::
V2
::
ResourceRequirements
- value( ::Google::Cloud::Run::V2::ResourceRequirements ) — Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
- ( ::Google::Cloud::Run::V2::ResourceRequirements ) — Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
#volume_mounts
def
volume_mounts
()
-
>
::
Array
< ::
Google
::
Cloud
::
Run
::
V2
::
VolumeMount
>
- (::Array< ::Google::Cloud::Run::V2::VolumeMount >) — Volume to mount into the container's filesystem.
#volume_mounts=
def
volume_mounts=
(
value
)
-
>
::
Array
< ::
Google
::
Cloud
::
Run
::
V2
::
VolumeMount
>
- value(::Array< ::Google::Cloud::Run::V2::VolumeMount >) — Volume to mount into the container's filesystem.
- (::Array< ::Google::Cloud::Run::V2::VolumeMount >) — Volume to mount into the container's filesystem.

