What’s in my container?
-
$ podman ps --ns CONTAINER ID NAMES PID CGROUPNS IPC MNT NET PIDNS USERNS UTS fe11359293e8 eloquent_austin 11090 4026532623 4026532621 4026532421 4026532624 4026531837 4026532622
-
$ sudo ls -l /proc/11090/root/ total 22628 lrwxrwxrwx. 1 root root 7 Jul 25 2019 bin -> usr/bin dr-xr-xr-x. 2 root root 6 Jul 25 2019 boot drwxr-xr-x. 5 root root 360 Jan 24 12:03 dev drwxr-xr-x. 1 root root 183 Jan 23 16:43 etc ...
Thank you.
[28 Jan@1135UTC] UPDATE—Actually, this doesn’t seem to work with newer systems, sorry!
Thanks for the hint.
I have couple of rootless containers running in podman, but unable to list contents of the root directory. Any pointers? See message below:
user@mango:~$ podman ps –ns
CONTAINER ID NAMES PID CGROUPNS IPC MNT NET PIDNS USERNS UTS
264e98659902 odoo10 2047 4026533069 4026533066 4026533064 4026533003 4026533067 4026532933 4026533065
bef856e0deec database10 1984 4026533002 4026532999 4026532997 4026532936 4026533000 4026532933 4026532998
user@mango:~$ su –
root@mango:~# ll /proc/1984/root
lrwxrwxrwx 1 166534 166534 0 Jan 27 17:26 /proc/1984/root -> /
root@mango:~# ll /proc/1984/root/
ls: cannot access ‘/proc/1984/root/’: Permission denied
Hmmm, I don’t know. The sequence I posted works on RHEL7 (kernel-3.10.0-1062.4.1.el7.x86_64, podman-1.4.4-4.el7.x86_64) but not on Fedora 30 (kernel-5.4.7-100.fc30.x86_64, podman-1.7.0-3.fc30.x86_64). I’ll look into it, it has implications for the GDB.