mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
fix up files that Docker bind mounts in so they are not set to desired values
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
parent
8dd1a88dec
commit
050ee55ffa
@ -1,6 +1,8 @@
|
||||
all: initrd.img
|
||||
|
||||
initrd.img: Dockerfile mkinitrd.sh repositories etc/hostname etc/motd etc/inittab
|
||||
ETCFILES=etc/motd etc/inittab etc/hostname- etc/resolv.conf- etc/hosts-
|
||||
|
||||
initrd.img: Dockerfile mkinitrd.sh repositories $(ETCFILES)
|
||||
rm -f initrd.img
|
||||
docker build -t moby:test .
|
||||
docker run -i -v $(PWD):/export moby:test /export/mkinitrd.sh
|
||||
|
6
alpine/etc/hosts-
Normal file
6
alpine/etc/hosts-
Normal file
@ -0,0 +1,6 @@
|
||||
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
|
4
alpine/etc/resolv.conf-
Normal file
4
alpine/etc/resolv.conf-
Normal file
@ -0,0 +1,4 @@
|
||||
nameserver 8.8.8.8
|
||||
nameserver 8.8.4.4
|
||||
nameserver 2001:4860:4860::8888
|
||||
nameserver 2001:4860:4860::8844
|
@ -42,6 +42,11 @@ mknod -m 600 sdb6 b 8 22
|
||||
|
||||
mkdir pty
|
||||
|
||||
cd /tmp
|
||||
# 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
|
||||
mv hostname- hostname
|
||||
|
||||
cd /tmp
|
||||
find . | cpio -H newc -o > /export/initrd.img
|
||||
|
Loading…
Reference in New Issue
Block a user