Class: Bricky::Bricks::System

Inherits:
Base
  • Object
show all
Defined in:
lib/bricky/bricks/system.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Bricky::Bricks::Base

Instance Method Details

#argumentsObject



14
15
16
# File 'lib/bricky/bricks/system.rb', line 14

def arguments
  ["-v #{bricks_path}/system:/bricks/system"]
end

#bootstrap(bootstrap_path) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/bricky/bricks/system.rb', line 6

def bootstrap(bootstrap_path)
  if config.fetch('bootstrap', false)
    config.fetch('bootstrap').collect do |command|
      "RUN #{command}"
    end
  end
end

#entrypointObject



18
19
20
# File 'lib/bricky/bricks/system.rb', line 18

def entrypoint
  '/bricks/system/builder'
end

#environmentsObject



22
23
24
25
# File 'lib/bricky/bricks/system.rb', line 22

def environments
  commands = config.fetch('builder', [])
  commands.empty? ? nil : ["-e BRICKS_SYSTEM_COMMANDS='#{encode(commands)}'"]
end