It's much more important that we use the image's /etc/passwd instead
of our own. Both inside and outside the image so that UIDs/GIDs get
resolved correctly.
with (
mount_build_overlay(state),\
- mount_passwd(state.root),\
mount_volatile_overlay(state),\
finalize_chroot_scripts(state) as cd\
):
with (
complete_step(f"Building {config.image or 'default'} image"),\
mount_tools(config.tools_tree),\
- mount_passwd(),\
prepend_to_environ_path(config)\
):
# After tools have been mounted, check if we have what we need