Seems like dib finds a resolv.conf file in the TMP_MOUNT_PATH/etc folder so it makes a copy https://github.com/openstack/diskimage-builder/blob/master/lib/common-functions#L256, uses the system configured resolv.conf if available https://github.com/openstack/diskimage-builder/blob/master/lib/common-functions#L264 and then restores the copy https://github.com/openstack/diskimage-builder/blob/master/lib/img-functions#L108. Unfortunately the restore is done after the cleanup phase so there are not available hooks to use to fix the issue cleanly.
Seems like dib finds a resolv.conf file in the TMP_MOUNT_PATH/etc folder so it makes a copy https:/ /github. com/openstack/ diskimage- builder/ blob/master/ lib/common- functions# L256, uses the system configured resolv.conf if available https:/ /github. com/openstack/ diskimage- builder/ blob/master/ lib/common- functions# L264 and then restores the copy https:/ /github. com/openstack/ diskimage- builder/ blob/master/ lib/img- functions# L108. Unfortunately the restore is done after the cleanup phase so there are not available hooks to use to fix the issue cleanly.