diff --git a/plugins/provisioners/docker/client.rb b/plugins/provisioners/docker/client.rb index 0f69e52a3..0b5063f47 100644 --- a/plugins/provisioners/docker/client.rb +++ b/plugins/provisioners/docker/client.rb @@ -77,10 +77,11 @@ module VagrantPlugins def create_container(config) args = "-cidfile=#{config[:cidfile]} " args << "-d " if config[:daemonize] + args << "-name #{config[:name]} " if config[:name] args << config[:args] if config[:args] @machine.communicate.sudo %[ rm -f #{config[:cidfile]} - docker run #{args} -name #{config[:name]} #{config[:image]} #{config[:cmd]} + docker run #{args} #{config[:image]} #{config[:cmd]} ] end