Class: LambdaRubyBundler::Container Private
- Inherits:
-
Object
- Object
- LambdaRubyBundler::Container
- Defined in:
- lib/lambda_ruby_bundler/container.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wrapper around [Docker::Container] for creating, running and removing bundler containers.
Instance Attribute Summary collapse
- #app_path ⇒ Object readonly private
- #build_dependencies ⇒ Object readonly private
- #root_path ⇒ Object readonly private
- #volume ⇒ Object readonly private
Instance Method Summary collapse
- #destroy ⇒ Object private
-
#initialize(root_path, app_path, volume, build_dependencies) ⇒ Container
constructor
private
A new instance of Container.
- #run(timeout: 120) ⇒ Object private
Constructor Details
#initialize(root_path, app_path, volume, build_dependencies) ⇒ Container
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Container.
10 11 12 13 14 15 |
# File 'lib/lambda_ruby_bundler/container.rb', line 10 def initialize(root_path, app_path, volume, build_dependencies) @root_path = root_path @app_path = app_path @volume = volume @build_dependencies = build_dependencies end |
Instance Attribute Details
#app_path ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/lambda_ruby_bundler/container.rb', line 8 def app_path @app_path end |
#build_dependencies ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/lambda_ruby_bundler/container.rb', line 8 def build_dependencies @build_dependencies end |
#root_path ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/lambda_ruby_bundler/container.rb', line 8 def root_path @root_path end |
#volume ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 |
# File 'lib/lambda_ruby_bundler/container.rb', line 8 def volume @volume end |
Instance Method Details
#destroy ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 26 |
# File 'lib/lambda_ruby_bundler/container.rb', line 23 def destroy container.remove @container = nil end |
#run(timeout: 120) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 20 21 |
# File 'lib/lambda_ruby_bundler/container.rb', line 17 def run(timeout: 120) container.start container.attach({}, read_timeout: timeout) end |