diff --git a/alpine/Makefile b/alpine/Makefile index e6c86b5dc..945c9be31 100644 --- a/alpine/Makefile +++ b/alpine/Makefile @@ -1,7 +1,6 @@ all: initrd.img ETCFILES=etc/issue etc/motd etc/network/interfaces -ETCFILES+=etc/resolv.conf- etc/hosts- ETCFILES+=etc/securetty initrd.img: Dockerfile mkinitrd.sh repositories $(ETCFILES) diff --git a/alpine/etc/hosts- b/alpine/etc/hosts- deleted file mode 100644 index 9d139c5b8..000000000 --- a/alpine/etc/hosts- +++ /dev/null @@ -1,6 +0,0 @@ -127.0.0.1 localhost -::1 localhost ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters diff --git a/alpine/etc/resolv.conf- b/alpine/etc/resolv.conf- deleted file mode 100644 index fbdb06b89..000000000 --- a/alpine/etc/resolv.conf- +++ /dev/null @@ -1,4 +0,0 @@ -nameserver 8.8.8.8 -nameserver 8.8.4.4 -nameserver 2001:4860:4860::8888 -nameserver 2001:4860:4860::8844 diff --git a/alpine/mkinitrd.sh b/alpine/mkinitrd.sh index 5c73a778d..30403a4ca 100755 --- a/alpine/mkinitrd.sh +++ b/alpine/mkinitrd.sh @@ -43,9 +43,24 @@ mknod -m 600 sdb6 b 8 22 mkdir pty # these three files are bind mounted in by docker so they are not what we want -cd /tmp/etc -mv hosts- hosts -mv resolv.conf- resolv.conf + +cat << EOF > /tmp/etc/hosts +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +EOF + +cat << EOF > /tmp/etc/resolv.conf +nameserver 8.8.8.8 +nameserver 8.8.4.4 +nameserver 2001:4860:4860::8888 +nameserver 2001:4860:4860::8844 +EOF + +printf 'docker' > /tmp/etc/hostname rm /tmp/bin/mkinitrd.sh