Class: DockerEngineRuby::Models::Container

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

Overview

Defined Under Namespace

Classes: GraphDriver, HostConfig, ImageManifestDescriptor, Mount, NetworkSettings, State, Storage

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(host_ip: nil, host_port: nil) ⇒ Object

PortBinding represents a binding between a host IP address and a host port.

Parameters:

  • host_ip (String) (defaults to: nil)

    Host IP address that the container’s port is mapped to.

  • host_port (String) (defaults to: nil)

    Host port number that the container’s port is mapped to.



# File 'lib/docker_engine_ruby/models/container.rb', line 211

Instance Attribute Details

#app_armor_profileString?

The AppArmor profile set for the container.

Returns:

  • (String, nil)


11
# File 'lib/docker_engine_ruby/models/container.rb', line 11

optional :app_armor_profile, String, api_name: :AppArmorProfile

#argsArray<String>?

The arguments to the command being run

Returns:

  • (Array<String>, nil)


17
# File 'lib/docker_engine_ruby/models/container.rb', line 17

optional :args, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Args

#configDockerEngineRuby::Models::Config?

Configuration for a container that is portable between hosts.



23
# File 'lib/docker_engine_ruby/models/container.rb', line 23

optional :config, -> { DockerEngineRuby::Config }, api_name: :Config

#createdTime?

Date and time at which the container was created, formatted in [RFC 3339](www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.

Returns:

  • (Time, nil)


30
# File 'lib/docker_engine_ruby/models/container.rb', line 30

optional :created, Time, api_name: :Created, nil?: true

#driverString?

The storage-driver used for the container’s filesystem (graph-driver or snapshotter).

Returns:

  • (String, nil)


37
# File 'lib/docker_engine_ruby/models/container.rb', line 37

optional :driver, String, api_name: :Driver

#exec_idsArray<String>?

IDs of exec instances that are running in the container.

Returns:

  • (Array<String>, nil)


43
# File 'lib/docker_engine_ruby/models/container.rb', line 43

optional :exec_ids, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :ExecIDs, nil?: true

#graph_driverDockerEngineRuby::Models::Container::GraphDriver?

Information about the storage driver used to store the container’s and image’s filesystem.



50
51
52
53
# File 'lib/docker_engine_ruby/models/container.rb', line 50

optional :graph_driver,
-> { DockerEngineRuby::Container::GraphDriver },
api_name: :GraphDriver,
nil?: true

#host_configDockerEngineRuby::Models::Container::HostConfig?

Container configuration that depends on the host we are running on



59
# File 'lib/docker_engine_ruby/models/container.rb', line 59

optional :host_config, -> { DockerEngineRuby::Container::HostConfig }, api_name: :HostConfig

#hostname_pathString?

Location of the /etc/hostname generated for the container on the host.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


68
# File 'lib/docker_engine_ruby/models/container.rb', line 68

optional :hostname_path, String, api_name: :HostnamePath

#hosts_pathString?

Location of the /etc/hosts generated for the container on the host.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


77
# File 'lib/docker_engine_ruby/models/container.rb', line 77

optional :hosts_path, String, api_name: :HostsPath

#idString?

The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes).

Returns:

  • (String, nil)


84
# File 'lib/docker_engine_ruby/models/container.rb', line 84

optional :id, String, api_name: :Id

#imageString?

The ID (digest) of the image that this container was created from.

Returns:

  • (String, nil)


90
# File 'lib/docker_engine_ruby/models/container.rb', line 90

optional :image, String, api_name: :Image

#image_manifest_descriptorDockerEngineRuby::Models::Container::ImageManifestDescriptor?

A descriptor struct containing digest, media type, and size, as defined in the [OCI Content Descriptors Specification](github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md).



97
98
99
# File 'lib/docker_engine_ruby/models/container.rb', line 97

optional :image_manifest_descriptor,
-> { DockerEngineRuby::Container::ImageManifestDescriptor },
api_name: :ImageManifestDescriptor

#log_pathString?

Location of the file used to buffer the container’s logs. Depending on the logging-driver used for the container, this field may be omitted.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


109
# File 'lib/docker_engine_ruby/models/container.rb', line 109

optional :log_path, String, api_name: :LogPath, nil?: true

#mount_labelString?

SELinux mount label set for the container.

Returns:

  • (String, nil)


115
# File 'lib/docker_engine_ruby/models/container.rb', line 115

optional :mount_label, String, api_name: :MountLabel

#mountsArray<DockerEngineRuby::Models::Container::Mount>?

List of mounts used by the container.



121
122
123
# File 'lib/docker_engine_ruby/models/container.rb', line 121

optional :mounts,
-> { DockerEngineRuby::Internal::Type::ArrayOf[DockerEngineRuby::Container::Mount] },
api_name: :Mounts

#nameString?

The name associated with this container.

For historic reasons, the name may be prefixed with a forward-slash (/).

Returns:

  • (String, nil)


131
# File 'lib/docker_engine_ruby/models/container.rb', line 131

optional :name, String, api_name: :Name

#network_settingsDockerEngineRuby::Models::Container::NetworkSettings?

NetworkSettings exposes the network settings in the API



137
138
139
# File 'lib/docker_engine_ruby/models/container.rb', line 137

optional :network_settings,
-> { DockerEngineRuby::Container::NetworkSettings },
api_name: :NetworkSettings

#pathString?

The path to the command being run

Returns:

  • (String, nil)


145
# File 'lib/docker_engine_ruby/models/container.rb', line 145

optional :path, String, api_name: :Path

#platformString?

The platform (operating system) for which the container was created.

This field was introduced for the experimental “LCOW” (Linux Containers On Windows) features, which has been removed. In most cases, this field is equal to the host’s operating system (linux or windows).

Returns:

  • (String, nil)


155
# File 'lib/docker_engine_ruby/models/container.rb', line 155

optional :platform, String, api_name: :Platform

#process_labelString?

SELinux process label set for the container.

Returns:

  • (String, nil)


161
# File 'lib/docker_engine_ruby/models/container.rb', line 161

optional :process_label, String, api_name: :ProcessLabel

#resolv_conf_pathString?

Location of the /etc/resolv.conf generated for the container on the host.

This file is managed through the docker daemon, and should not be accessed or modified by other tools.

Returns:

  • (String, nil)


170
# File 'lib/docker_engine_ruby/models/container.rb', line 170

optional :resolv_conf_path, String, api_name: :ResolvConfPath

#restart_countInteger?

Number of times the container was restarted since it was created, or since daemon was started.

Returns:

  • (Integer, nil)


177
# File 'lib/docker_engine_ruby/models/container.rb', line 177

optional :restart_count, Integer, api_name: :RestartCount

#size_root_fsInteger?

The total size of all files in the read-only layers from the image that the container uses. These layers can be shared between containers.

This field is omitted by default, and only set when size is requested in the API request.

Returns:

  • (Integer, nil)


187
# File 'lib/docker_engine_ruby/models/container.rb', line 187

optional :size_root_fs, Integer, api_name: :SizeRootFs, nil?: true

#size_rwInteger?

The size of files that have been created or changed by this container.

This field is omitted by default, and only set when size is requested in the API request.

Returns:

  • (Integer, nil)


196
# File 'lib/docker_engine_ruby/models/container.rb', line 196

optional :size_rw, Integer, api_name: :SizeRw, nil?: true

#stateDockerEngineRuby::Models::Container::State?

ContainerState stores container’s running state. It’s part of ContainerJSONBase and will be returned by the “inspect” command.



203
# File 'lib/docker_engine_ruby/models/container.rb', line 203

optional :state, -> { DockerEngineRuby::Container::State }, api_name: :State

#storageDockerEngineRuby::Models::Container::Storage?

Information about the storage used by the container.



209
# File 'lib/docker_engine_ruby/models/container.rb', line 209

optional :storage, -> { DockerEngineRuby::Container::Storage }, api_name: :Storage, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_ruby/models/container.rb', line 1904