Skip to content

Commit 215299c

Browse files
committed
Fix network creation
1 parent 0d173d7 commit 215299c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

basescript

bin/fresh-start.sh

+9-6
Original file line numberDiff line numberDiff line change
@@ -515,9 +515,9 @@ local_undo_restore() {
515515
LOCAL_KEEP_RESTORE_FILES=${1:-$KEEP_RESTORE_FILES}
516516

517517
echoerror \
518-
"It seems something went wrong running '${FUNCNAME[0]}' \
519-
\nwe will try to UNDO all actions done by this script. \
520-
\nPlease make sure everything was put it back in place." false
518+
"It seems something went wrong! \
519+
\nRunning '${FUNCNAME[0]} to try to UNDO all actions done by this script. \
520+
\nPlease make sure everything was put it back in place." false
521521

522522
# If docker network was created
523523
if [[ "$ACTION_DOCKER_NETWORK_CREATED" == true ]]; then
@@ -1208,11 +1208,14 @@ run_function docker_check_network_exists $DOCKER_NETWORK_NAME
12081208

12091209
if [[ ! "$DOCKER_NETWORK_EXISTS" == true ]]; then
12101210

1211-
IPv4_SUBNET=${ARG_IPv4_SUBNET:-"172.17.0.0/16"} # required argument for function docker_network_create
1212-
run_function docker_network_create $DOCKER_NETWORK_NAME $IPv4_SUBNET $ACTIVATE_IPV6 $ARG_IPv6_SUBNET
1211+
run_function docker_network_create $DOCKER_NETWORK_NAME ${ARG_IPv4_SUBNET:-null} $ACTIVATE_IPV6 $ARG_IPv6_SUBNET
12131212

12141213
if [[ "$ERROR_DOCKER_NETWORK_CREATE" == true ]]; then
1215-
echoerror "There was error when creating the docker network $DOCKER_NETWORK_NAME [IPv6 enabled: ${ACTIVATE_IPV6:-'false'} ]" false
1214+
echoerror \
1215+
"There was an error when creating the docker network $DOCKER_NETWORK_NAME [IPv6 enabled: ${ACTIVATE_IPV6:-'false'} ] \
1216+
\nPlease try to create the network by yourself using the appropriate options described below and try again: \
1217+
\nhttps://docs.docker.com/engine/reference/commandline/network_create/" \
1218+
false
12161219
local_undo_restore
12171220
else
12181221
ACTION_DOCKER_NETWORK_CREATED=true

0 commit comments

Comments
 (0)