providers/docker: don't pull if image is built

This commit is contained in:
Mitchell Hashimoto 2015-07-08 10:10:43 -06:00
parent c2cae80de5
commit dbf0af2e3f
1 changed files with 3 additions and 2 deletions

View File

@ -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)