lib/percheron/container/main.rb in percheron-0.4.0 vs lib/percheron/container/main.rb in percheron-0.5.0

- old
+ new

@@ -6,11 +6,11 @@ extend ConfigDelegator def_delegators :container_config, :name def_config_item_with_default :container_config, false, :auto_recreate - def_config_item_with_default :container_config, [], :env, :ports, :volumes, :dependant_container_names, :pre_build_scripts + def_config_item_with_default :container_config, [], :env, :ports, :volumes, :dependant_container_names, :pre_build_scripts, :post_start_scripts alias_method :auto_recreate?, :auto_recreate def initialize(config, stack, container_name) @config = config @@ -23,9 +23,15 @@ def id exists? ? info.id[0...12] : 'N/A' end def image + Docker::Image.get(image_name) + rescue Docker::Error::NotFoundError + nil + end + + def image_name '%s:%s' % [ name, version.to_s ] end def version Semantic::Version.new(container_config.version)