Class: Holodekk::Image::Instructions::Run::Options::WithSecretMount
- Inherits:
-
Builder::Option
- Object
- Builder::Option
- Holodekk::Image::Instructions::Run::Options::WithSecretMount
- Defined in:
- lib/holodekk/image/instructions/run/options/with_secret_mount.rb
Defined Under Namespace
Classes: OptionBuilder
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#gid ⇒ Object
Returns the value of attribute gid.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#readonly ⇒ Object
(also: #readonly?)
Returns the value of attribute readonly.
-
#sharing ⇒ Object
Returns the value of attribute sharing.
-
#source ⇒ Object
Returns the value of attribute source.
-
#target ⇒ Object
Returns the value of attribute target.
-
#uid ⇒ Object
Returns the value of attribute uid.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Builder::Option
#as_dockerfile, #as_json, #to_json
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def from @from end |
#gid ⇒ Object
Returns the value of attribute gid.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def gid @gid end |
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def id @id end |
#mode ⇒ Object
Returns the value of attribute mode.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def mode @mode end |
#readonly ⇒ Object Also known as: readonly?
Returns the value of attribute readonly.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def readonly @readonly end |
#sharing ⇒ Object
Returns the value of attribute sharing.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def sharing @sharing end |
#source ⇒ Object
Returns the value of attribute source.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def source @source end |
#target ⇒ Object
Returns the value of attribute target.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def target @target end |
#uid ⇒ Object
Returns the value of attribute uid.
9 10 11 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 9 def uid @uid end |
Class Method Details
.buld(target, **kwargs) ⇒ Object
13 14 15 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 13 def self.buld(target, **kwargs) new({ target: target }.merge(kwargs)) end |
Instance Method Details
#to_dockerfile ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/holodekk/image/instructions/run/options/with_secret_mount.rb', line 17 def to_dockerfile builder = OptionBuilder.new('mount=type=cache') builder.build do pair 'target', target %i[from gid id mode sharing source uid].each do |key| v = send(key) pair key, v unless v.nil? flag 'readonly' if readonly? end end builder.output end |