Class: Devkitkat::Executor::Docker
- Inherits:
-
Object
- Object
- Devkitkat::Executor::Docker
- Defined in:
- lib/devkitkat/executor/docker.rb
Instance Attribute Summary collapse
-
#script_file ⇒ Object
readonly
Returns the value of attribute script_file.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
- #cleanup ⇒ Object
- #commit(script_file) ⇒ Object
-
#initialize(service) ⇒ Docker
constructor
A new instance of Docker.
- #prepare ⇒ Object
Constructor Details
#initialize(service) ⇒ Docker
Returns a new instance of Docker.
11 12 13 |
# File 'lib/devkitkat/executor/docker.rb', line 11 def initialize(service) @service = service end |
Instance Attribute Details
#script_file ⇒ Object (readonly)
Returns the value of attribute script_file.
7 8 9 |
# File 'lib/devkitkat/executor/docker.rb', line 7 def script_file @script_file end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
7 8 9 |
# File 'lib/devkitkat/executor/docker.rb', line 7 def service @service end |
Instance Method Details
#cleanup ⇒ Object
19 20 21 |
# File 'lib/devkitkat/executor/docker.rb', line 19 def cleanup stop_container end |
#commit(script_file) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/devkitkat/executor/docker.rb', line 23 def commit(script_file) @script_file = script_file rewrite_root_path! new_path = script_path_in_container container.exec([new_path]) end |
#prepare ⇒ Object
15 16 17 |
# File 'lib/devkitkat/executor/docker.rb', line 15 def prepare start_container end |