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.
114 115 116 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 114 def initialize(path) @data = Psych.load_file(path)['services'] end |
Instance Method Details
#build_arguments(instance) ⇒ Object
126 127 128 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 126 def build_arguments(instance) fetch(instance).fetch('build', {})['args'] end |
#build_context(instance) ⇒ Object
122 123 124 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 122 def build_context(instance) fetch(instance).fetch('build', {})['context'] end |
#command(instance) ⇒ Object
142 143 144 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 142 def command(instance) fetch(instance)['command'] end |
#container_name(instance) ⇒ Object
138 139 140 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 138 def container_name(instance) fetch(instance)['container_name'] end |
#docker_file(instance) ⇒ Object
130 131 132 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 130 def docker_file(instance) fetch(instance).fetch('build', {})['dockerfile'] end |
#image(instance) ⇒ Object
134 135 136 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 134 def image(instance) fetch(instance)['image'] end |
#volumes(instance) ⇒ Object
118 119 120 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 118 def volumes(instance) fetch(instance)['volumes'] end |
#working_directory(instance) ⇒ Object
146 147 148 |
# File 'lib/aruba/tasks/docker_helpers.rb', line 146 def working_directory(instance) fetch(instance)['working_dir'] end |