Class: Aruba::DockerComposeFile
- Inherits:
-
Object
- Object
- Aruba::DockerComposeFile
- Defined in:
- lib/aruba/tasks/docker_helpers.rb
Instance Method Summary collapse
- #build_arguments(instance) ⇒ Object
- #build_context(instance) ⇒ Object
- #command(instance) ⇒ Object
- #container_name(instance) ⇒ Object
- #docker_file(instance) ⇒ Object
- #image(instance) ⇒ Object
-
#initialize(path) ⇒ DockerComposeFile
constructor
A new instance of DockerComposeFile.
- #volumes(instance) ⇒ Object
- #working_directory(instance) ⇒ Object
Constructor Details
#initialize(path) ⇒ DockerComposeFile
Returns a new instance of DockerComposeFile.
112 113 114 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 112 def initialize(path) @data = Psych.load_file(path)['services'] end |
Instance Method Details
#build_arguments(instance) ⇒ Object
124 125 126 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 124 def build_arguments(instance) fetch(instance).fetch('build', {})['args'] end |
#build_context(instance) ⇒ Object
120 121 122 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 120 def build_context(instance) fetch(instance).fetch('build', {})['context'] end |
#command(instance) ⇒ Object
140 141 142 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 140 def command(instance) fetch(instance)['command'] end |
#container_name(instance) ⇒ Object
136 137 138 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 136 def container_name(instance) fetch(instance)['container_name'] end |
#docker_file(instance) ⇒ Object
128 129 130 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 128 def docker_file(instance) fetch(instance).fetch('build', {})['dockerfile'] end |
#image(instance) ⇒ Object
132 133 134 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 132 def image(instance) fetch(instance)['image'] end |
#volumes(instance) ⇒ Object
116 117 118 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 116 def volumes(instance) fetch(instance)['volumes'] end |
#working_directory(instance) ⇒ Object
144 145 146 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 144 def working_directory(instance) fetch(instance)['working_dir'] end |