provisioners/docker: allow images to be configured with images:

This commit is contained in:
Mitchell Hashimoto 2013-12-03 14:25:20 -08:00
parent d3b7bffc65
commit c55f7dfd64
2 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,10 @@ module VagrantPlugins
@version = :latest
end
def images=(images)
@images = Set.new(images)
end
def pull_images(*images)
@images += images.map(&:to_s)
end

View File

@ -12,6 +12,7 @@ module VagrantPlugins
class Provisioner < Vagrant.plugin("2", :provisioner)
def initialize(machine, config, installer = nil, client = nil)
super(machine, config)
# TODO: Rename to installer / client (drop docker suffix)
@installer = installer || DockerInstaller.new(@machine, config.version)
@client = client || DockerClient.new(@machine)