Fixes for network stuff.

This commit is contained in:
Fabian Schlenz 2020-09-04 06:16:55 +02:00
parent 73c3f5aacb
commit 1eb3a8ded7
1 changed files with 2 additions and 1 deletions

3
dup.rb
View File

@ -226,8 +226,9 @@ class Container
def filename; "%s/%s.yml" % [$base_dir, @name]; end
def build_run_command
$net_host = true if @data["net"]=="host"
cmd = ["docker", "create"]
cmd << "--net" << @data["networks"][0] if @data["networks"] && !$net_host
cmd << "--net" << @data["networks"][0] if @data["networks"] && @data["networks"].count>0 && !$net_host
cmd << "--net" << "host" if $net_host
if !@data["test"]