We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cb08da commit 987b111Copy full SHA for 987b111
root/etc/cont-init.d/50-config
@@ -58,7 +58,7 @@ fi
58
59
# if DB_HOST contains a port and DB_HOST is not a IPv6 without brackets [..]
60
# support ipv4:port, [ipv6]:port, and domain:port
61
-if echo "$DB_HOST" | grep -qE ':[0-9]+$' && ! echo "$DB_HOST" | grep -qE '^(:{0,2}[a-fA-F0-9]{1,4})+$'; then
+if [[ ${DB_HOST} =~ :[0-9]+$ ]] && ! [[ ${DB_HOST} =~ ^(:{0,2}[a-fA-F0-9]{1,4})+$ ]]; then
62
DB_HOST_PORT="${DB_HOST}"
63
fi
64
0 commit comments