Replace /etc/resolv.conf content with something generic

This commit is contained in:
Olaf Meeuwissen 2017-08-18 22:12:12 +09:00
parent ad5af964fc
commit bbf24ada3b
1 changed files with 18 additions and 0 deletions

18
scripts/replace-resolve-conf Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# replace-resolve-conf -- with a generic fallback
# Copyright (C) 2017 Olaf Meeuwissen
#
# License: GPL-3.0+
# The build environment's /etc/resolv.conf gets copied into the rootfs
# which is unlikely to work and may unintentionally disclose info. We
# replace it with a version that uses two google-public-dns servers.
# The docker engine should replace this with a copy of the file that's
# used by the host.
cat > /etc/resolv.conf <<EOF
nameserver 8.8.8.8
nameserver 8.8.4.4
EOF
rm $0