From c55f7dfd642ce6580006084cbc9c686e8be4ddbb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 3 Dec 2013 14:25:20 -0800 Subject: [PATCH] provisioners/docker: allow images to be configured with images: --- plugins/provisioners/docker/config.rb | 4 ++++ plugins/provisioners/docker/provisioner.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/plugins/provisioners/docker/config.rb b/plugins/provisioners/docker/config.rb index f90335835..bd8ec5140 100644 --- a/plugins/provisioners/docker/config.rb +++ b/plugins/provisioners/docker/config.rb @@ -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 diff --git a/plugins/provisioners/docker/provisioner.rb b/plugins/provisioners/docker/provisioner.rb index 546c4b20f..eac195b22 100644 --- a/plugins/provisioners/docker/provisioner.rb +++ b/plugins/provisioners/docker/provisioner.rb @@ -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)