lib/dockistrano/service_dependency.rb
# Creates a new service instance based on the name and configuration. When
# configuration is not local, the configuration is fetched from Github and
# processed.
# In some cases, you only need an uninitialized version of a dependency, for
# example when pulling new versions of images. Provide initialize=false to
# skip tag detection and configuration loading from the image.
Creates a new service instance based on the name and configuration. When
configuration is not local, the configuration is fetched from Github and
processed.
In some cases, you only need an uninitialized version of a dependency, for
example when pulling new versions of images. Provide initialize=false to
skip tag detection and configuration loading from the image.
Creates a new service instance based on the name and configuration . When configuration is not local the configuration is fetched from Github and processed . In some cases you only need an uninitialized version of a dependency for example when pulling new versions of images . Provide initialize = false to skip tag detection and configuration loading from the image .
def tag_with_fallback(tag)
      fallback_tags = [tag, "develop", "master", "latest"]
      available_tags = Docker.tags_for_image("#{backing_service.registry}/#{backing_service.image_name}")
      begin
        tag_suggestion = fallback_tags.shift
        final_tag = tag_suggestion if available_tags.include?(tag_suggestion)
      end while !final_tag and fallback_tags.any?
      if final_tag
        final_tag
      else
        raise NoTagFoundForImage.new("No tag found for image #{backing_service.image_name}, locally available tags: #{available_tags} `doc pull` for more tags from repository.")
      end
    end
def tag_with_fallback ( tag ) fallback_tags = [ tag , "develop" , "master" , "latest" ] available_tags = Docker . tags_for_image ( "#{backing_service.registry}/#{backing_service.image_name}" ) begin tag_suggestion = fallback_tags . shift final_tag = tag_suggestion if available_tags . include? ( tag_suggestion ) end while ! final_tag and fallback_tags . any? if final_tag final_tag else raise NoTagFoundForImage . new ( "No tag found for image #{backing_service.image_name}, locally available tags: #{available_tags} `doc pull` for more tags from repository." ) end end
Creates a new service instance based on the name and configuration.
Creates a new service instance based on the name and configuration .
tag