Class: DockerSwarm::Container
- Includes:
- DockerSwarm::Concerns::Creatable, DockerSwarm::Concerns::Deletable, DockerSwarm::Concerns::Loggable
- Defined in:
- lib/docker_swarm/models/container.rb
Overview
Represents a Docker Container
Class Method Summary collapse
-
.create_query_params ⇒ Array<String>
POST /containers/createtoma el nombre por query string.
Instance Method Summary collapse
-
#start ⇒ Boolean
Starts the container.
-
#stop ⇒ Boolean
Stops the container.
Methods included from DockerSwarm::Concerns::Loggable
Methods included from DockerSwarm::Concerns::Deletable
Methods included from DockerSwarm::Concerns::Creatable
#query_params_for_docker, #save
Methods inherited from Base
all, #as_json, #assign_attributes, #attributes, defined_attributes, find, #id, #initialize, #method_missing, #payload_for_docker, #persisted?, #reload, resource_name, #respond_to_missing?, root_key, routes, #serializable_hash, where
Methods included from DockerSwarm::Concerns::Inspectable
Constructor Details
This class inherits a constructor from DockerSwarm::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class DockerSwarm::Base
Class Method Details
.create_query_params ⇒ Array<String>
POST /containers/create toma el nombre por query string. En el body Docker lo
descarta en silencio y responde 201: el container nace con nombre aleatorio
y la adopción por nombre determinista en un reintento no encuentra nada, así que
el reintento duplica. Ver ADR-025 cláusula 1.
16 17 18 |
# File 'lib/docker_swarm/models/container.rb', line 16 def self.create_query_params %w[name].freeze end |