The Question
If a process running inside a container as user ID 1000 creates a file on a shared mount, what user ID will be shown as the file’s owner when viewed from outside the container?
Example
Assume we have the following Containerfile:
FROM debian:bookworm
RUN useradd --uid 1000 nonroot
USER nonroot
And then I run the following commands:
podman build . -t debian:bookworm-nonroot
podman run --volume /tmp:/tmp debian:bookworm-nonroot touch /tmp/x
What will be shown as the owner user ID when running the following command?