Module: DockerCompose
- Defined in:
- lib/docker_compose_ruby.rb
Class Attribute Summary collapse
-
.project_name ⇒ Object
Returns the value of attribute project_name.
-
.yaml ⇒ Object
Returns the value of attribute yaml.
-
.yaml_path ⇒ Object
Returns the value of attribute yaml_path.
Class Method Summary collapse
-
.delete(options = {}) ⇒ String
Deletes the set of containers listed in your compose file.
-
.set_project_name(name) ⇒ String
Set Specific compose project name.
-
.set_yaml_path(path) ⇒ String
Set Path to Docker Compose Yaml File.
-
.start(options = {}) ⇒ String
Starts the set of containers listed in your compose file.
-
.stop(options = {}) ⇒ String
Stops the set of containers listed in your compose file.
-
.up(options = {}) ⇒ String
Ups the set of containers listed in your compose file.
-
.version ⇒ String
Displays the current version of Docker compose.
Class Attribute Details
.project_name ⇒ Object
Returns the value of attribute project_name.
8 9 10 |
# File 'lib/docker_compose_ruby.rb', line 8 def project_name @project_name end |
.yaml ⇒ Object
Returns the value of attribute yaml.
8 9 10 |
# File 'lib/docker_compose_ruby.rb', line 8 def yaml @yaml end |
.yaml_path ⇒ Object
Returns the value of attribute yaml_path.
8 9 10 |
# File 'lib/docker_compose_ruby.rb', line 8 def yaml_path @yaml_path end |
Class Method Details
.delete(options = {}) ⇒ String
Deletes the set of containers listed in your compose file.
54 55 56 57 |
# File 'lib/docker_compose_ruby.rb', line 54 def delete( = {}) = nil if .empty? compose('delete',) end |
.set_project_name(name) ⇒ String
Set Specific compose project name.
30 31 32 33 |
# File 'lib/docker_compose_ruby.rb', line 30 def set_project_name(name) @project_name = "-p #{name}" name end |
.set_yaml_path(path) ⇒ String
Set Path to Docker Compose Yaml File.
18 19 20 21 |
# File 'lib/docker_compose_ruby.rb', line 18 def set_yaml_path(path) @yaml_path = "-f #{path}" @yaml = YAML.load_file(path) end |
.start(options = {}) ⇒ String
Starts the set of containers listed in your compose file.
78 79 80 81 |
# File 'lib/docker_compose_ruby.rb', line 78 def start( = {}) = nil if .empty? compose('start', ) end |
.stop(options = {}) ⇒ String
Stops the set of containers listed in your compose file.
66 67 68 69 |
# File 'lib/docker_compose_ruby.rb', line 66 def stop( = {}) = nil if .empty? compose('stop', ) end |
.up(options = {}) ⇒ String
Ups the set of containers listed in your compose file.
42 43 44 45 |
# File 'lib/docker_compose_ruby.rb', line 42 def up( = {}) = nil if .empty? compose('up',) end |
.version ⇒ String
Displays the current version of Docker compose
90 91 92 |
# File 'lib/docker_compose_ruby.rb', line 90 def version compose('-v') end |