Class: DockerEngine::Models::Container::HostConfig::Mount

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine/models/container.rb

Defined Under Namespace

Modules: Type Classes: BindOptions, ImageOptions, TmpfsOptions, VolumeOptions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(mode: nil, options: nil, size_bytes: nil) ⇒ Object

Some parameter documentations has been truncated, see TmpfsOptions for more details.

Optional configuration for the tmpfs type.

Parameters:

  • mode (Integer) (defaults to: nil) —

    The permission mode for the tmpfs mount in an integer.

  • options (Array<Array<String>>) (defaults to: nil) —

    The options to be passed to the tmpfs mount. An array of arrays.

  • size_bytes (Integer) (defaults to: nil) —

    The size for the tmpfs mount in bytes.



# File 'lib/docker_engine/models/container.rb', line 1355

Instance Attribute Details

#bind_options ⇒ DockerEngine::Models::Container::HostConfig::Mount::BindOptions?

Optional configuration for the bind type.



1284
1285
1286
# File 'lib/docker_engine/models/container.rb', line 1284

optional :bind_options,
-> { DockerEngine::Container::HostConfig::Mount::BindOptions },
api_name: :BindOptions

#consistency ⇒ String?

The consistency requirement for the mount: default, consistent, cached, or delegated.

Returns:

  • (String, nil)


1293
# File 'lib/docker_engine/models/container.rb', line 1293

optional :consistency, String, api_name: :Consistency

#image_options ⇒ DockerEngine::Models::Container::HostConfig::Mount::ImageOptions?

Optional configuration for the image type.



1299
1300
1301
# File 'lib/docker_engine/models/container.rb', line 1299

optional :image_options,
-> { DockerEngine::Container::HostConfig::Mount::ImageOptions },
api_name: :ImageOptions

#read_only ⇒ Boolean?

Whether the mount should be read-only.

Returns:

  • (Boolean, nil)


1307
# File 'lib/docker_engine/models/container.rb', line 1307

optional :read_only, DockerEngine::Internal::Type::Boolean, api_name: :ReadOnly

#source ⇒ String?

Mount source (e.g. a volume name, a host path). The source cannot be specified when using Type=tmpfs. For Type=bind, the source path must either exist, or the CreateMountpoint must be set to true to create the source path on the host if missing.

For Type=npipe, the pipe must exist prior to creating the container.

Returns:

  • (String, nil)


1318
# File 'lib/docker_engine/models/container.rb', line 1318

optional :source, String, api_name: :Source

#target ⇒ String?

Container path.

Returns:

  • (String, nil)


1324
# File 'lib/docker_engine/models/container.rb', line 1324

optional :target, String, api_name: :Target

#tmpfs_options ⇒ DockerEngine::Models::Container::HostConfig::Mount::TmpfsOptions?

Optional configuration for the tmpfs type.



1330
1331
1332
# File 'lib/docker_engine/models/container.rb', line 1330

optional :tmpfs_options,
-> { DockerEngine::Container::HostConfig::Mount::TmpfsOptions },
api_name: :TmpfsOptions

#type ⇒ Symbol, ...

The mount type. Available types:

  • bind a mount of a file or directory from the host into the container.
  • cluster a Swarm cluster volume.
  • image an OCI image.
  • npipe a named pipe from the host into the container.
  • tmpfs a tmpfs.
  • volume a docker volume with the given Name.


1345
# File 'lib/docker_engine/models/container.rb', line 1345

optional :type, enum: -> { DockerEngine::Container::HostConfig::Mount::Type }, api_name: :Type

#volume_options ⇒ DockerEngine::Models::Container::HostConfig::Mount::VolumeOptions?

Optional configuration for the volume type.



1351
1352
1353
# File 'lib/docker_engine/models/container.rb', line 1351

optional :volume_options,
-> { DockerEngine::Container::HostConfig::Mount::VolumeOptions },
api_name: :VolumeOptions

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine/models/container.rb', line 1450