Hi!

It looks like when connecting to existing docker container with `docker
exec` CONFIG_GRKERNSEC_PROC_USERGROUP (and probably
CONFIG_GRKERNSEC_PROC_USER too) hide processes started by `docker run`
from processes started by `docker exec` (all processes are running as
docker "root", docker daemon is started with default options, i.e. without
--userns-remap).

Why is this happens and is there any workaround?


$ sudo zgrep GRKERNSEC_PROC_USER /proc/config.gz
# CONFIG_GRKERNSEC_PROC_USER is not set
CONFIG_GRKERNSEC_PROC_USERGROUP=y

$ docker run -d -it --rm --init alpine sh -c 'ps ax; exec sleep 42'
49bec4451495563d702ad0edb9a7c80a9a7f5918fab4eb67e5a44b803f3ac656

$ docker logs 49bec4451495
PID   USER     TIME   COMMAND
    1 root       0:00 /dev/init -- sh -c ps ax; exec sleep 42
    7 root       0:00 sh -c ps ax; exec sleep 42
    8 root       0:00 ps ax

$ docker exec -it 49bec4451495 ps ax
PID   USER     TIME   COMMAND
    9 root       0:00 ps ax

-- 
                        WBR, Alex.

Reply via email to