Class: Google::Apis::BatchV1::AgentContainer
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::AgentContainer
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb
Overview
Container runnable representation on the agent side.
Instance Attribute Summary collapse
-
#commands ⇒ Array<String>
Overrides the
CMD
specified in the container. -
#entrypoint ⇒ String
Overrides the
ENTRYPOINT
specified in the container. -
#image_uri ⇒ String
The URI to pull the container image from.
-
#options ⇒ String
Arbitrary additional options to include in the "docker run" command when running this container, e.g.
-
#volumes ⇒ Array<String>
Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AgentContainer
constructor
A new instance of AgentContainer.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AgentContainer
Returns a new instance of AgentContainer.
123 124 125 |
# File 'lib/google/apis/batch_v1/classes.rb', line 123 def initialize(**args) update!(**args) end |
Instance Attribute Details
#commands ⇒ Array<String>
Overrides the CMD
specified in the container. If there is an ENTRYPOINT (
either in the container image or with the entrypoint field below) then
commands are appended as arguments to the ENTRYPOINT.
Corresponds to the JSON property commands
98 99 100 |
# File 'lib/google/apis/batch_v1/classes.rb', line 98 def commands @commands end |
#entrypoint ⇒ String
Overrides the ENTRYPOINT
specified in the container.
Corresponds to the JSON property entrypoint
103 104 105 |
# File 'lib/google/apis/batch_v1/classes.rb', line 103 def entrypoint @entrypoint end |
#image_uri ⇒ String
The URI to pull the container image from.
Corresponds to the JSON property imageUri
108 109 110 |
# File 'lib/google/apis/batch_v1/classes.rb', line 108 def image_uri @image_uri end |
#options ⇒ String
Arbitrary additional options to include in the "docker run" command when
running this container, e.g. "--network host".
Corresponds to the JSON property options
114 115 116 |
# File 'lib/google/apis/batch_v1/classes.rb', line 114 def @options end |
#volumes ⇒ Array<String>
Volumes to mount (bind mount) from the host machine files or directories into
the container, formatted to match docker run's --volume option, e.g. /foo:/bar,
or /foo:/bar:ro
Corresponds to the JSON property volumes
121 122 123 |
# File 'lib/google/apis/batch_v1/classes.rb', line 121 def volumes @volumes end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
128 129 130 131 132 133 134 |
# File 'lib/google/apis/batch_v1/classes.rb', line 128 def update!(**args) @commands = args[:commands] if args.key?(:commands) @entrypoint = args[:entrypoint] if args.key?(:entrypoint) @image_uri = args[:image_uri] if args.key?(:image_uri) @options = args[:options] if args.key?(:options) @volumes = args[:volumes] if args.key?(:volumes) end |