Can I map container uid to host uid for privileged container?
Is it possible to map multiple container uids to a single host uid?
I’m trying to containerize Android and faced a seg fault in audio library.
While investigating, I found some odd uids are listed with ps command in host side as below.
It seems that uid/gid mapping is not reflected to my test.
Container uids are system(1000), graphics(1003), media(1013), and keystore(1017) which are shown as same as in both of host and container.
How can I map a container uid to a host uid in privileged container?
or in un-privileged container with direct uid/gid mapping like hole punching?
architecture: aarch64
config:
boot.autostart: "false"
raw.idmap: |
both 1000 1000
both 1000 1003
both 1000 1013
both 1000 1017
both 1000 1036
both 1000 2000
raw.lxc: |
lxc.init_cmd=/bin/init
The very definition of privileged containers is that there is no user namespace and uid/gid mapping in place. So it’s not possible for you to both run a privileged container and have a number of uid/gid mapped to different values.
I suspected that the seg fault of audio library in Android container is caused by non-existing uid/gid. To verify my suspicion, I’d like to change those uids/gids.
Anyway, I had tested it by adding new users on host side, which revealed that it is not related to uid/guid.
@stgraber, would you give me some additional comment for this log?
When I start my Android container, I get this dmesg before Android init process starts. But the container seems to launch successfully displaying Android boot-animation, mouse pointer, etc.
Note. This also happens when I launch ubuntu:16.04 container.