providers/docker: get rid of mutex around Docker access, should be safe
This commit is contained in:
parent
7829e9b167
commit
d837086572
|
@ -4,7 +4,6 @@ module VagrantPlugins
|
||||||
class Create
|
class Create
|
||||||
def initialize(app, env)
|
def initialize(app, env)
|
||||||
@app = app
|
@app = app
|
||||||
@@mutex ||= Mutex.new
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
|
@ -18,23 +17,20 @@ module VagrantPlugins
|
||||||
|
|
||||||
params = create_params
|
params = create_params
|
||||||
|
|
||||||
cid = ''
|
env[:ui].output(I18n.t("docker_provider.creating"))
|
||||||
@@mutex.synchronize do
|
env[:ui].detail(" Name: #{params[:name]}")
|
||||||
env[:ui].output(I18n.t("docker_provider.creating"))
|
env[:ui].detail(" Image: #{params[:image]}")
|
||||||
env[:ui].detail(" Name: #{params[:name]}")
|
params[:volumes].each do |volume|
|
||||||
env[:ui].detail(" Image: #{params[:image]}")
|
env[:ui].detail("Volume: #{volume}")
|
||||||
params[:volumes].each do |volume|
|
|
||||||
env[:ui].detail("Volume: #{volume}")
|
|
||||||
end
|
|
||||||
params[:ports].each do |pair|
|
|
||||||
env[:ui].detail(" Port: #{pair}")
|
|
||||||
end
|
|
||||||
params[:links].each do |name, other|
|
|
||||||
env[:ui].detail(" Link: #{name}:#{other}")
|
|
||||||
end
|
|
||||||
|
|
||||||
cid = @driver.create(params)
|
|
||||||
end
|
end
|
||||||
|
params[:ports].each do |pair|
|
||||||
|
env[:ui].detail(" Port: #{pair}")
|
||||||
|
end
|
||||||
|
params[:links].each do |name, other|
|
||||||
|
env[:ui].detail(" Link: #{name}:#{other}")
|
||||||
|
end
|
||||||
|
|
||||||
|
cid = @driver.create(params)
|
||||||
|
|
||||||
env[:ui].detail(" \n"+I18n.t(
|
env[:ui].detail(" \n"+I18n.t(
|
||||||
"docker_provider.created", id: cid[0...16]))
|
"docker_provider.created", id: cid[0...16]))
|
||||||
|
|
Loading…
Reference in New Issue