mkosi icon indicating copy to clipboard operation
mkosi copied to clipboard

Support building as non-root using kernel 5.12 UID mappings

Open DaanDeMeyer opened this issue 4 years ago • 2 comments

Once support lands in systemd-nspawn, we should support running the mkosi build as a non-root user. The biggest advantage I see here is that we can solve the annoyance where files created in directories that are mounted into the build image are owned by root in the host filesystem. With the 5.12 mapping feature, we can make sure all these files are owned by the user running mkosi instead.

DaanDeMeyer avatar May 07 '21 22:05 DaanDeMeyer

Don't we still need root to mount the loopback device to build in?

behrmann avatar May 07 '21 23:05 behrmann

Ah yeah, the title is misleading, I meant non-root the inside the build container.

DaanDeMeyer avatar May 08 '21 10:05 DaanDeMeyer