Class: KuberKit::ImageCompiler::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/kuber_kit/image_compiler/compiler.rb

Instance Method Summary collapse

Instance Method Details

#compile(shell, image_name, builds_dir) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/kuber_kit/image_compiler/compiler.rb', line 10

def compile(shell, image_name, builds_dir)
  image = image_store.get_image(image_name)

  image_build_dir = File.join(builds_dir, image.name.to_s)

  context_helper = context_helper_factory.build_image_context(shell)
  image_build_dir_creator.create(shell, image, image_build_dir, context_helper: context_helper)

  image_builder.build(shell, image, image_build_dir, context_helper: context_helper, args: [])
  image_build_dir_creator.cleanup(shell, image_build_dir)
end