Class: Dapp::Config::Directive::Docker::Dimg
- Defined in:
- lib/dapp/config/directive/docker/dimg.rb
Overview
Dimg
Instance Attribute Summary collapse
-
#_cmd ⇒ Object
readonly
Returns the value of attribute _cmd.
-
#_entrypoint ⇒ Object
readonly
Returns the value of attribute _entrypoint.
-
#_env ⇒ Object
readonly
Returns the value of attribute _env.
-
#_expose ⇒ Object
readonly
Returns the value of attribute _expose.
-
#_label ⇒ Object
readonly
Returns the value of attribute _label.
-
#_onbuild ⇒ Object
readonly
Returns the value of attribute _onbuild.
-
#_user ⇒ Object
readonly
Returns the value of attribute _user.
-
#_volume ⇒ Object
readonly
Returns the value of attribute _volume.
-
#_workdir ⇒ Object
readonly
Returns the value of attribute _workdir.
Attributes inherited from Base
Instance Method Summary collapse
- #_change_options ⇒ Object
- #cmd(*args) ⇒ Object
- #entrypoint(*cmd_with_args) ⇒ Object
- #env(**options) ⇒ Object
- #expose(*args) ⇒ Object
-
#initialize(**kwargs, &blk) ⇒ Dimg
constructor
A new instance of Dimg.
- #label(**options) ⇒ Object
- #onbuild(*args) ⇒ Object
- #user(val) ⇒ Object
- #volume(*args) ⇒ Object
- #workdir(path) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(**kwargs, &blk) ⇒ Dimg
Returns a new instance of Dimg.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 9 def initialize(**kwargs, &blk) @_volume = [] @_expose = [] @_env = {} @_label = {} @_cmd = [] @_onbuild = [] super(**kwargs, &blk) end |
Instance Attribute Details
#_cmd ⇒ Object (readonly)
Returns the value of attribute _cmd.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _cmd @_cmd end |
#_entrypoint ⇒ Object (readonly)
Returns the value of attribute _entrypoint.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _entrypoint @_entrypoint end |
#_env ⇒ Object (readonly)
Returns the value of attribute _env.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _env @_env end |
#_expose ⇒ Object (readonly)
Returns the value of attribute _expose.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _expose @_expose end |
#_label ⇒ Object (readonly)
Returns the value of attribute _label.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _label @_label end |
#_onbuild ⇒ Object (readonly)
Returns the value of attribute _onbuild.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _onbuild @_onbuild end |
#_user ⇒ Object (readonly)
Returns the value of attribute _user.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _user @_user end |
#_volume ⇒ Object (readonly)
Returns the value of attribute _volume.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _volume @_volume end |
#_workdir ⇒ Object (readonly)
Returns the value of attribute _workdir.
7 8 9 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 7 def _workdir @_workdir end |
Instance Method Details
#_change_options ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 56 def { volume: _volume, expose: _expose, env: _env, label: _label, cmd: _cmd, onbuild: _onbuild, workdir: _workdir, user: _user, entrypoint: _entrypoint } end |
#cmd(*args) ⇒ Object
36 37 38 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 36 def cmd(*args) @_cmd.concat(args) end |
#entrypoint(*cmd_with_args) ⇒ Object
52 53 54 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 52 def entrypoint(*cmd_with_args) @_entrypoint = cmd_with_args.flatten end |
#env(**options) ⇒ Object
28 29 30 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 28 def env(**) @_env.merge!() end |
#expose(*args) ⇒ Object
24 25 26 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 24 def expose(*args) @_expose.concat(args) end |
#label(**options) ⇒ Object
32 33 34 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 32 def label(**) @_label.merge!() end |
#onbuild(*args) ⇒ Object
40 41 42 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 40 def onbuild(*args) @_onbuild.concat(args) end |
#user(val) ⇒ Object
48 49 50 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 48 def user(val) @_user = val end |
#volume(*args) ⇒ Object
20 21 22 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 20 def volume(*args) @_volume.concat(args) end |
#workdir(path) ⇒ Object
44 45 46 |
# File 'lib/dapp/config/directive/docker/dimg.rb', line 44 def workdir(path) @_workdir = path_format(path) end |