From f1e730e9a12de05105728951a4f1a7f167eafa31 Mon Sep 17 00:00:00 2001 From: Ray Clanan Date: Fri, 29 Aug 2014 23:29:58 -0400 Subject: [PATCH] Unset container name if docker_run is called. Fixes #4294 --- plugins/providers/docker/action/create.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/providers/docker/action/create.rb b/plugins/providers/docker/action/create.rb index 6b10dd180..4b0334d5a 100644 --- a/plugins/providers/docker/action/create.rb +++ b/plugins/providers/docker/action/create.rb @@ -32,12 +32,19 @@ module VagrantPlugins # Remove container after execution params[:rm] = true if env[:run_rm] + # Name should not be used with run_command + params[:name] = UNSET_VALUE + # We link to our original container # TODO end env[:ui].output(I18n.t("docker_provider.creating")) - env[:ui].detail(" Name: #{params[:name]}") + + if params[:name] != UNSET_VALUE + env[:ui].detail(" Name: #{params[:name]}") + end + env[:ui].detail(" Image: #{params[:image]}") if params[:cmd] && !params[:cmd].empty? env[:ui].detail(" Cmd: #{params[:cmd].join(" ")}")