Map non-root user in host to non-root user in container with the same uid

Introduction Once when I use gVisor’s rootless mode, I found that non-root user can only be mapped to root in container. Some software’s behaviour is different between root user and non-root user. So I want to run gVisor mapped the non-root user to the same user in container. Following is what I wanted. The uid=1000 user is the same both in user ns and the outside user ns. My first attempt is to…