class Panoramix::Plugin::DockerBuild
Attributes
context[R]
dockerfile[R]
env[R]
Public Class Methods
new(dst, dockerfile, context, host)
click to toggle source
Calls superclass method
# File lib/panoramix/plugin/docker_build.rb, line 12 def initialize(dst, dockerfile, context, host) super(dst, host) @dockerfile = dockerfile @context = context @env = Hash.new @env["DOCKER_HOST"] = "tcp://#{host}" if host end
Public Instance Methods
needed?(timestamps)
click to toggle source
When this instance needs to be executed
# File lib/panoramix/plugin/docker_build.rb, line 21 def needed? timestamps return false if ENV['NO_BUILD'] && ENV['NO_BUILD'].split(":").any? { |image| image == @dst } return true end
ps()
click to toggle source
Calls superclass method
# File lib/panoramix/plugin/docker_build.rb, line 31 def ps super ("Built image") end
run_default()
click to toggle source
Default action for this task
# File lib/panoramix/plugin/docker_build.rb, line 27 def run_default shell("docker build -t #{dst} -f #{@dockerfile} #{@context}", false, @env) end