Skip to content

Commit 97a8737

Browse files
committed
Fixes #83
Signed-off-by: Elijah Zupancic <[email protected]>
1 parent 3d968ad commit 97a8737

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

common/docker-entrypoint.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@ parseBoolean() {
3232

3333
# This line is an addition to the NGINX Docker image's entrypoint script.
3434
if [ -z ${DNS_RESOLVERS+x} ]; then
35-
export DNS_RESOLVERS="$(cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2 | xargs)"
35+
resolvers=""
36+
for ip in $(grep nameserver /etc/resolv.conf | cut -d' ' -f2 | xargs)
37+
do
38+
if echo "${ip}" | grep -q ':'; then
39+
resolvers="$resolvers [${ip}]"
40+
else
41+
resolvers="$resolvers $ip"
42+
fi
43+
done
44+
export DNS_RESOLVERS="${resolvers}"
3645
fi
3746

3847
# Normalize the CORS_ENABLED environment variable to a numeric value

0 commit comments

Comments
 (0)