From fa5a5fe8f104dc69e2cf92a9fe54ff01ec73c355 Mon Sep 17 00:00:00 2001 From: Peter Wilmott
Date: Tue, 21 Jul 2015 20:04:46 +0100 Subject: [PATCH] Populate resolv.conf to get DNS working --- README.md | 1 - bocker | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 318e704..9012a15 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,6 @@ img_74432 ## Functionality: Not Yet Implemented -* DNS * Port Forwarding * Data Volumes * Data Volume Containers diff --git a/bocker b/bocker index 24f2a9c..a3fe1fb 100755 --- a/bocker +++ b/bocker @@ -37,7 +37,7 @@ done } function PS() { -echo -e "CONTAINER_ID\t\t\t\t\tCOMMAND" +echo -e "CONTAINER_ID\t\tCOMMAND" for ps in "$btrfs_path"/ps_*; do ps=$($basename "$ps") echo -e "$ps\t\t$($cat "$btrfs_path/$ps/$ps.cmd")" @@ -57,6 +57,7 @@ ip netns exec netns_"$uuid" ip addr add 10.0.0.2/24 dev veth1_"$uuid" ip netns exec netns_"$uuid" ip link set dev veth1_"$uuid" up ip netns exec netns_"$uuid" ip route add default via 10.0.0.1 $btrfs subvolume snapshot "$btrfs_path/$1" "$btrfs_path/$uuid" > /dev/null +echo 'nameserver 8.8.8.8' > "$btrfs_path/$uuid"/etc/resolv.conf echo "$2" > "$btrfs_path/$uuid/$uuid.cmd" ip netns exec netns_"$uuid" "$unshare" -fp --mount-proc "$chroot" \ "$btrfs_path/$uuid" /bin/sh -c "/bin/mount -t proc proc /proc && $2" \