Class: Google::Apis::WorkstationsV1::Container
- Inherits:
-
Object
- Object
- Google::Apis::WorkstationsV1::Container
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/workstations_v1/classes.rb,
lib/google/apis/workstations_v1/representations.rb,
lib/google/apis/workstations_v1/representations.rb
Overview
A Docker container.
Instance Attribute Summary collapse
-
#args ⇒ Array<String>
Optional.
-
#command ⇒ Array<String>
Optional.
-
#env ⇒ Hash<String,String>
Optional.
-
#image ⇒ String
Optional.
-
#run_as_user ⇒ Fixnum
Optional.
-
#working_dir ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Container
constructor
A new instance of Container.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Container
Returns a new instance of Container.
279 280 281 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 279 def initialize(**args) update!(**args) end |
Instance Attribute Details
#args ⇒ Array<String>
Optional. Arguments passed to the entrypoint.
Corresponds to the JSON property args
243 244 245 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 243 def args @args end |
#command ⇒ Array<String>
Optional. If set, overrides the default ENTRYPOINT specified by the image.
Corresponds to the JSON property command
248 249 250 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 248 def command @command end |
#env ⇒ Hash<String,String>
Optional. Environment variables passed to the container's entrypoint.
Corresponds to the JSON property env
253 254 255 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 253 def env @env end |
#image ⇒ String
Optional. A Docker container image that defines a custom environment. Cloud
Workstations provides a number of preconfigured images, but you can create your own
custom container images. If using a private image, the host.gceInstance.
serviceAccount field must be specified in the workstation configuration. If
using a custom container image, the service account must have Artifact
Registry Reader permission to pull the specified image. Otherwise, the image
must be publicly accessible.
Corresponds to the JSON property image
267 268 269 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 267 def image @image end |
#run_as_user ⇒ Fixnum
Optional. If set, overrides the USER specified in the image with the given uid.
Corresponds to the JSON property runAsUser
272 273 274 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 272 def run_as_user @run_as_user end |
#working_dir ⇒ String
Optional. If set, overrides the default DIR specified by the image.
Corresponds to the JSON property workingDir
277 278 279 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 277 def working_dir @working_dir end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
284 285 286 287 288 289 290 291 |
# File 'lib/google/apis/workstations_v1/classes.rb', line 284 def update!(**args) @args = args[:args] if args.key?(:args) @command = args[:command] if args.key?(:command) @env = args[:env] if args.key?(:env) @image = args[:image] if args.key?(:image) @run_as_user = args[:run_as_user] if args.key?(:run_as_user) @working_dir = args[:working_dir] if args.key?(:working_dir) end |