class Docker
Public Class Methods
new()
click to toggle source
# File lib/build/docker.rb, line 3 def initialize end
Public Instance Methods
build_data_container(docker_file_path)
click to toggle source
@param [string] docker_file_path @return [string] The ID of the image that was built in Docker
# File lib/build/docker.rb, line 28 def build_data_container(docker_file_path) command = "docker build #{docker_file_path}" output = `#{command}` puts output output_match = /(Successfully built )(.*)/.match(output) fail 'Docker failed to build the container!' unless output_match puts "Built Data Container Image: #{output_match[2]}" output_match[2] end
push(tag)
click to toggle source
@param [string] tag @return [string] The tag we just pushed up
# File lib/build/docker.rb, line 19 def push(tag) command = "docker push #{tag}" puts command system command tag end
tag(image_id, tag)
click to toggle source
@param [string] image_id @param [string] tag @return [string] The tag we just tagged the container with
# File lib/build/docker.rb, line 10 def tag(image_id, tag) command = "docker tag #{image_id} #{tag}" puts command system command tag end