Skip to content

Commit

Permalink
check for none on add_net
Browse files Browse the repository at this point in the history
Potential fix for #65
  • Loading branch information
olayonjavier authored Jun 6, 2023
1 parent 88d5479 commit 3473f59
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Rebuild-DNDC/ParseDockerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down

0 comments on commit 3473f59

Please sign in to comment.