Class: Holodekk::Image::Instructions::Run
- Inherits:
-
Builder::Instruction
- Object
- Builder::Instruction
- Holodekk::Image::Instructions::Run
- Defined in:
- lib/holodekk/image/instructions/run.rb,
lib/holodekk/image/instructions/run/options/with_ssh_mount.rb,
lib/holodekk/image/instructions/run/options/with_bind_mount.rb,
lib/holodekk/image/instructions/run/options/with_cache_mount.rb,
lib/holodekk/image/instructions/run/options/with_tmpfs_mount.rb,
lib/holodekk/image/instructions/run/options/with_secret_mount.rb
Defined Under Namespace
Modules: Instructions, Options Classes: Builder
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Builder::Instruction
#as_json, instruction_tag, tag, #tag, #to_json
Class Method Details
Instance Method Details
#instructions ⇒ Object
15 16 17 |
# File 'lib/holodekk/image/instructions/run.rb', line 15 def instructions @instructions ||= [] end |
#options ⇒ Object
19 20 21 |
# File 'lib/holodekk/image/instructions/run.rb', line 19 def @options ||= [] end |
#to_dockerfile ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/holodekk/image/instructions/run.rb', line 23 def to_dockerfile # builder = InstructionBuilder.new('RUN') # builder.build do # options.each do |o| # option o.to_dockerfile # end # end res = 'RUN '.dup unless .empty? res << .map(&:to_dockerfile).join(',') res << " \\\n\t" end res << instructions.map(&:to_dockerfile).join(" && \\\n\t") res end |