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 3d968ad commit 97a8737Copy full SHA for 97a8737
common/docker-entrypoint.sh
@@ -32,7 +32,16 @@ parseBoolean() {
32
33
# This line is an addition to the NGINX Docker image's entrypoint script.
34
if [ -z ${DNS_RESOLVERS+x} ]; then
35
- export DNS_RESOLVERS="$(cat /etc/resolv.conf | grep nameserver | cut -d' ' -f2 | xargs)"
+ 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}"
45
fi
46
47
# Normalize the CORS_ENABLED environment variable to a numeric value
0 commit comments