Class: Kuby::Docker::SetupPhase
- Defined in:
- lib/kuby/docker/setup_phase.rb
Constant Summary collapse
- DEFAULT_WORKING_DIR =
'/usr/src/app'.freeze
Instance Attribute Summary collapse
-
#base_image ⇒ Object
Returns the value of attribute base_image.
-
#working_dir ⇒ Object
Returns the value of attribute working_dir.
Attributes inherited from Phase
Instance Method Summary collapse
Methods inherited from Phase
Constructor Details
This class inherits a constructor from Kuby::Docker::Phase
Instance Attribute Details
#base_image ⇒ Object
Returns the value of attribute base_image.
6 7 8 |
# File 'lib/kuby/docker/setup_phase.rb', line 6 def base_image @base_image end |
#working_dir ⇒ Object
Returns the value of attribute working_dir.
6 7 8 |
# File 'lib/kuby/docker/setup_phase.rb', line 6 def working_dir @working_dir end |
Instance Method Details
#apply_to(dockerfile) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/kuby/docker/setup_phase.rb', line 8 def apply_to(dockerfile) dockerfile.from(base_image || default_base_image) dockerfile.workdir(working_dir || DEFAULT_WORKING_DIR) dockerfile.env("RAILS_ENV=#{Kuby.env}") dockerfile.env("KUBY_ENV=#{Kuby.env}") end |