Sha256: 63ea795762ac22e5fd11e4318758e088c296e33befb5e2c720c855f8faa0efe4
Contents?: true
Size: 655 Bytes
Versions: 71
Compression:
Stored size: 655 Bytes
Contents
# This class allows image-based tasks to be created. class Docker::ImageTask < Rake::Task def self.scope_name(_scope, task_name) task_name end def needed? !has_repo_tag? end private def has_repo_tag? images.any? { |image| image.info['RepoTags'].include?(repo_tag) } end def images @images ||= Docker::Image.all(:all => true) end def repo name.split(':')[0] end def tag name.split(':')[1] || 'latest' end def repo_tag "#{repo}:#{tag}" end end # Monkeypatch Rake to add the `image` task. module Rake::DSL def image(*args, &block) Docker::ImageTask.define_task(*args, &block) end end
Version data entries
71 entries across 71 versions & 1 rubygems