Class: DockerEngineRuby::Models::Config

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

Direct Known Subclasses

ImageCommitParams

Defined Under Namespace

Classes: Healthcheck

Instance Attribute 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(args_escaped: nil, attach_stderr: nil, attach_stdin: nil, attach_stdout: nil, cmd: nil, domainname: nil, entrypoint: nil, env: nil, exposed_ports: nil, healthcheck: nil, hostname: nil, image: nil, labels: nil, network_disabled: nil, on_build: nil, open_stdin: nil, shell: nil, stdin_once: nil, stop_signal: nil, stop_timeout: nil, tty: nil, user: nil, volumes: nil, working_dir: nil) ⇒ Object

Some parameter documentations has been truncated, see DockerEngineRuby::Models::Config for more details.

Configuration for a container that is portable between hosts.

Parameters:

  • args_escaped (Boolean, nil) (defaults to: nil)

    Command is already escaped (Windows only)

  • attach_stderr (Boolean) (defaults to: nil)

    Whether to attach to stderr.

  • attach_stdin (Boolean) (defaults to: nil)

    Whether to attach to stdin.

  • attach_stdout (Boolean) (defaults to: nil)

    Whether to attach to stdout.

  • cmd (Array<String>) (defaults to: nil)

    Command to run specified as a string or an array of strings.

  • domainname (String) (defaults to: nil)

    The domain name to use for the container.

  • entrypoint (Array<String>) (defaults to: nil)

    The entry point for the container as a string or an array of strings.

  • env (Array<String>) (defaults to: nil)

    A list of environment variables to set inside the container in the

  • exposed_ports (Hash{Symbol=>Hash{Symbol=>Object}}, nil) (defaults to: nil)

    An object mapping ports to an empty object in the form:

  • healthcheck (DockerEngineRuby::Models::Config::Healthcheck) (defaults to: nil)

    A test to perform to check that the container is healthy.

  • hostname (String) (defaults to: nil)

    The hostname to use for the container, as a valid RFC 1123 hostname.

  • image (String) (defaults to: nil)

    The name (or reference) of the image to use when creating the container,

  • labels (Hash{Symbol=>String}) (defaults to: nil)

    User-defined key/value metadata.

  • network_disabled (Boolean, nil) (defaults to: nil)

    Disable networking for the container.

  • on_build (Array<String>, nil) (defaults to: nil)

    ONBUILD metadata that were defined in the image’s Dockerfile.

  • open_stdin (Boolean) (defaults to: nil)

    Open stdin

  • shell (Array<String>, nil) (defaults to: nil)

    Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

  • stdin_once (Boolean) (defaults to: nil)

    Close stdin after one attached client disconnects

  • stop_signal (String, nil) (defaults to: nil)

    Signal to stop a container as a string or unsigned integer.

  • stop_timeout (Integer, nil) (defaults to: nil)

    Timeout to stop a container in seconds.

  • tty (Boolean) (defaults to: nil)

    Attach standard streams to a TTY, including stdin if it is not closed.

  • user (String) (defaults to: nil)

    Commands run as this user inside the container. If omitted, commands

  • volumes (Hash{Symbol=>Hash{Symbol=>Object}}) (defaults to: nil)

    An object mapping mount point paths inside the container to empty

  • working_dir (String) (defaults to: nil)

    The working directory for commands to run in.



# File 'lib/docker_engine_ruby/models/config.rb', line 172

Instance Attribute Details

#args_escapedBoolean?

Command is already escaped (Windows only)

Returns:

  • (Boolean, nil)


10
# File 'lib/docker_engine_ruby/models/config.rb', line 10

optional :args_escaped, DockerEngineRuby::Internal::Type::Boolean, api_name: :ArgsEscaped, nil?: true

#attach_stderrBoolean?

Whether to attach to stderr.

Returns:

  • (Boolean, nil)


16
# File 'lib/docker_engine_ruby/models/config.rb', line 16

optional :attach_stderr, DockerEngineRuby::Internal::Type::Boolean, api_name: :AttachStderr

#attach_stdinBoolean?

Whether to attach to stdin.

Returns:

  • (Boolean, nil)


22
# File 'lib/docker_engine_ruby/models/config.rb', line 22

optional :attach_stdin, DockerEngineRuby::Internal::Type::Boolean, api_name: :AttachStdin

#attach_stdoutBoolean?

Whether to attach to stdout.

Returns:

  • (Boolean, nil)


28
# File 'lib/docker_engine_ruby/models/config.rb', line 28

optional :attach_stdout, DockerEngineRuby::Internal::Type::Boolean, api_name: :AttachStdout

#cmdArray<String>?

Command to run specified as a string or an array of strings.

Returns:

  • (Array<String>, nil)


34
# File 'lib/docker_engine_ruby/models/config.rb', line 34

optional :cmd, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Cmd

#domainnameString?

The domain name to use for the container.

Returns:

  • (String, nil)


40
# File 'lib/docker_engine_ruby/models/config.rb', line 40

optional :domainname, String, api_name: :Domainname

#entrypointArray<String>?

The entry point for the container as a string or an array of strings.

If the array consists of exactly one empty string (‘[“”]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no ENTRYPOINT instruction in the Dockerfile).

Returns:

  • (Array<String>, nil)


50
# File 'lib/docker_engine_ruby/models/config.rb', line 50

optional :entrypoint, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Entrypoint

#envArray<String>?

A list of environment variables to set inside the container in the form ‘[“VAR=value”, …]`. A variable without `=` is removed from the environment, rather than to have an empty value.

Returns:

  • (Array<String>, nil)


58
# File 'lib/docker_engine_ruby/models/config.rb', line 58

optional :env, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Env

#exposed_portsHash{Symbol=>Hash{Symbol=>Object}}?

An object mapping ports to an empty object in the form:

‘{}`

Returns:

  • (Hash{Symbol=>Hash{Symbol=>Object}}, nil)


66
67
68
69
# File 'lib/docker_engine_ruby/models/config.rb', line 66

optional :exposed_ports,
DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::Internal::Type::Unknown]],
api_name: :ExposedPorts,
nil?: true

#healthcheckDockerEngineRuby::Models::Config::Healthcheck?

A test to perform to check that the container is healthy. Healthcheck commands should be side-effect free.



76
# File 'lib/docker_engine_ruby/models/config.rb', line 76

optional :healthcheck, -> { DockerEngineRuby::Config::Healthcheck }, api_name: :Healthcheck

#hostnameString?

The hostname to use for the container, as a valid RFC 1123 hostname.

Returns:

  • (String, nil)


82
# File 'lib/docker_engine_ruby/models/config.rb', line 82

optional :hostname, String, api_name: :Hostname

#imageString?

The name (or reference) of the image to use when creating the container, or which was used when the container was created.

Returns:

  • (String, nil)


89
# File 'lib/docker_engine_ruby/models/config.rb', line 89

optional :image, String, api_name: :Image

#labelsHash{Symbol=>String}?

User-defined key/value metadata.

Returns:

  • (Hash{Symbol=>String}, nil)


95
# File 'lib/docker_engine_ruby/models/config.rb', line 95

optional :labels, DockerEngineRuby::Internal::Type::HashOf[String], api_name: :Labels

#network_disabledBoolean?

Disable networking for the container.

Returns:

  • (Boolean, nil)


101
102
103
104
# File 'lib/docker_engine_ruby/models/config.rb', line 101

optional :network_disabled,
DockerEngineRuby::Internal::Type::Boolean,
api_name: :NetworkDisabled,
nil?: true

#on_buildArray<String>?

ONBUILD metadata that were defined in the image’s Dockerfile.

Returns:

  • (Array<String>, nil)


110
# File 'lib/docker_engine_ruby/models/config.rb', line 110

optional :on_build, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :OnBuild, nil?: true

#open_stdinBoolean?

Open stdin

Returns:

  • (Boolean, nil)


116
# File 'lib/docker_engine_ruby/models/config.rb', line 116

optional :open_stdin, DockerEngineRuby::Internal::Type::Boolean, api_name: :OpenStdin

#shellArray<String>?

Shell for when RUN, CMD, and ENTRYPOINT uses a shell.

Returns:

  • (Array<String>, nil)


122
# File 'lib/docker_engine_ruby/models/config.rb', line 122

optional :shell, DockerEngineRuby::Internal::Type::ArrayOf[String], api_name: :Shell, nil?: true

#stdin_onceBoolean?

Close stdin after one attached client disconnects

Returns:

  • (Boolean, nil)


128
# File 'lib/docker_engine_ruby/models/config.rb', line 128

optional :stdin_once, DockerEngineRuby::Internal::Type::Boolean, api_name: :StdinOnce

#stop_signalString?

Signal to stop a container as a string or unsigned integer.

Returns:

  • (String, nil)


134
# File 'lib/docker_engine_ruby/models/config.rb', line 134

optional :stop_signal, String, api_name: :StopSignal, nil?: true

#stop_timeoutInteger?

Timeout to stop a container in seconds.

Returns:

  • (Integer, nil)


140
# File 'lib/docker_engine_ruby/models/config.rb', line 140

optional :stop_timeout, Integer, api_name: :StopTimeout, nil?: true

#ttyBoolean?

Attach standard streams to a TTY, including stdin if it is not closed.

Returns:

  • (Boolean, nil)


146
# File 'lib/docker_engine_ruby/models/config.rb', line 146

optional :tty, DockerEngineRuby::Internal::Type::Boolean, api_name: :Tty

#userString?

Commands run as this user inside the container. If omitted, commands run as the user specified in the image the container was started from.

Can be either user-name or UID, and optional group-name or GID, separated by a colon (‘<user-name|UID>`).

Returns:

  • (String, nil)


156
# File 'lib/docker_engine_ruby/models/config.rb', line 156

optional :user, String, api_name: :User

#volumesHash{Symbol=>Hash{Symbol=>Object}}?

An object mapping mount point paths inside the container to empty objects.

Returns:

  • (Hash{Symbol=>Hash{Symbol=>Object}}, nil)


162
163
164
# File 'lib/docker_engine_ruby/models/config.rb', line 162

optional :volumes,
DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::Internal::Type::HashOf[DockerEngineRuby::Internal::Type::Unknown]],
api_name: :Volumes

#working_dirString?

The working directory for commands to run in.

Returns:

  • (String, nil)


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

optional :working_dir, String, api_name: :WorkingDir