Class: Dapp::Build::Stage::From

Inherits:
Base
  • Object
show all
Defined in:
lib/dapp/build/stage/from.rb

Overview

From

Instance Attribute Summary

Attributes inherited from Base

#application, #next_stage, #prev_stage

Instance Method Summary collapse

Methods inherited from Base

#build!, #dependencies_empty?, #empty?, #image, #initialize

Methods included from Mod::Logging

#ignore_log_commands?, #image_info, #log_build, #log_image_commands, #log_image_info, #should_be_introspected?, #should_be_not_detailed?, #should_be_not_present?, #should_be_skipped?, #size_difference?

Methods included from Helper::Trivia

class_to_lowercase, #class_to_lowercase, #delete_file, #kwargs

Methods included from Helper::Sha256

#hashsum, #paths_content_hashsum, #sha256

Constructor Details

This class inherits a constructor from Dapp::Build::Stage::Base

Instance Method Details

#dependencies ⇒ Object



10
11
12
# File 'lib/dapp/build/stage/from.rb', line 10

def dependencies
  [from_image_name, application.config._docker._from_cache_version, Dapp::BUILD_CACHE_VERSION]
end

#save_in_cache! ⇒ Object



14
15
16
17
# File 'lib/dapp/build/stage/from.rb', line 14

def save_in_cache!
  from_image.untag! if from_image.pulled?
  super
end

#signature ⇒ Object



6
7
8
# File 'lib/dapp/build/stage/from.rb', line 6

def signature
  hashsum [*dependencies.flatten]
end