Class: Dapp::Config::Directive::Docker::Base
- Defined in:
- lib/dapp/config/directive/docker/base.rb
Overview
Base
Instance Attribute Summary collapse
-
#_from ⇒ Object
readonly
Returns the value of attribute _from.
-
#_from_cache_version ⇒ Object
readonly
Returns the value of attribute _from_cache_version.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dapp::Config::Base
Instance Attribute Details
#_from ⇒ Object (readonly)
Returns the value of attribute _from.
7 8 9 |
# File 'lib/dapp/config/directive/docker/base.rb', line 7 def _from @_from end |
#_from_cache_version ⇒ Object (readonly)
Returns the value of attribute _from_cache_version.
7 8 9 |
# File 'lib/dapp/config/directive/docker/base.rb', line 7 def _from_cache_version @_from_cache_version end |
Instance Method Details
#from(image, cache_version: nil) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/dapp/config/directive/docker/base.rb', line 9 def from(image, cache_version: nil) image = image.to_s raise(Error::Config, code: :docker_from_incorrect, data: { name: image }) unless Image::Docker.image_name?(image) raise(Error::Config, code: :docker_from_without_tag, data: { name: image }) unless image.include?(':') @_from = image @_from_cache_version = cache_version end |