I want to run a program inside a container with a specific user. By default, when using lxc-attach, the user is root, but I don't want to execute the program as root.
Command I want to execute:
lxc-attach -n container -- python3 some_program.py
When attached to the container, I want the user to be uid=1000 not uid=0 (root)
I know it's possible with lxc-execute, with lxc.init_uid and lxc.init_gid [src: LXC.CONTAINER.CONF(5)], but with lxc-execute I don't have network connection (because the container is not running?).