From dbf0af2e3fea2dcf7c76956ac0e58127dd1df846 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 8 Jul 2015 10:10:43 -0600 Subject: [PATCH] providers/docker: don't pull if image is built --- plugins/providers/docker/action/pull.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/providers/docker/action/pull.rb b/plugins/providers/docker/action/pull.rb index f8695d2c4..20d620792 100644 --- a/plugins/providers/docker/action/pull.rb +++ b/plugins/providers/docker/action/pull.rb @@ -12,9 +12,10 @@ module VagrantPlugins @provider_config = @machine.provider_config @driver = @machine.provider.driver - image = @env[:create_image] - image ||= @provider_config.image + # Skip pulling if the image is built + return @app.call(env) if @env[:create_image] + image = @provider_config.image env[:ui].output(I18n.t("docker_provider.pull", image: image)) @driver.pull(image)