image_builder: create /etc/resolv.conf

Since the image rootfs is readonly, we
create an empty /etc/resolv.conf which
the agent would later bind-remount as
read-write.

Fixes: #345

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
This commit is contained in:
Nitesh Konkar 2019-08-12 19:15:32 +05:30
parent 88f8216978
commit 862b077598

View File

@ -391,6 +391,9 @@ create_rootfs_image() {
info "Creating empty machine-id to allow systemd to bind-mount it"
touch "${mount_dir}/etc/machine-id"
info "Creating empty resolv.conf to allow kata-agent to bind-mount it"
touch "${mount_dir}/etc/resolv.conf"
info "Unmounting root partition"
umount "${mount_dir}"
OK "Root partition unmounted"