diff --git a/Rebuild-DNDC/ParseDockerTemplate.sh b/Rebuild-DNDC/ParseDockerTemplate.sh index 3ed0e08..8f59aca 100644 --- a/Rebuild-DNDC/ParseDockerTemplate.sh +++ b/Rebuild-DNDC/ParseDockerTemplate.sh @@ -110,11 +110,13 @@ add_net(){ else net=$(xmllint --xpath "/Container/Networking/Mode/text()" $xmlFile 2> /dev/null) fi - docker_string+=" --net=\"$net\"" - if [[ $net == bridge ]]; then - call_add_ports=1 + if [[ $net != "none" ]]; then + docker_string+=" --net=\"$net\"" + if [[ $net == bridge ]]; then + call_add_ports=1 + fi + [ "$verbose" = "1" ] && echo "Found Net: --net=\"$net\"" fi - [ "$verbose" = "1" ] && echo "Found Net: --net=\"$net\"" } add_privileged(){