providers/docker: Container links are an array, not a hash

This commit is contained in:
Fabio Rehm 2014-05-07 12:07:53 -03:00
parent 89db0f64e5
commit b68cb6d7b4
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ module VagrantPlugins
def create(params, **opts, &block)
image = params.fetch(:image)
links = params.fetch(:links)
links = Array(params.fetch(:links))
ports = Array(params[:ports])
volumes = Array(params[:volumes])
name = params.fetch(:name)
@ -41,7 +41,7 @@ module VagrantPlugins
run_cmd << "-d" if params[:detach]
run_cmd += env.map { |k,v| ['-e', "#{k}=#{v}"] }
run_cmd += expose.map { |p| ['--expose', "#{p}"] }
run_cmd += links.map { |k, v| ['--link', "#{k}:#{v}"] }
run_cmd += links.map { |l| ['--link', "#{l}"] }
run_cmd += ports.map { |p| ['-p', p.to_s] }
run_cmd += volumes.map { |v| ['-v', v.to_s] }
run_cmd += %W(--privileged) if params[:privileged]