Home directories

/root

The default root home directory /root on bootc images is a symbolic link to /var/roothome, defaulting to machine-local state. For more on /var see Filesystem.

At the current time, when run as a container image the /var/roothome directory will not exist. This has a few side effects; one of them is that the default ~/.bashrc that is injected into the current "app" containers like quay.io/fedora/fedora:41 will not be sourced, and $PATH will hence be different.

In general, if you just happen to need to run some tools at build time, you can run e.g.:

RUN mkdir -p -m 0700 /var/roothome && \
    <your provisioning tooling here> && \
    rm -rf /var/roothome

which will help keep the image clean, avoiding leaking build-time code into the final image.

/home

Similarly, the /home directory is a symbolic link to /var/home and does not exist by default. For more on non-root users and groups, see Authentication, Users and Groups.