I have a Debian host. I create and start an Alpine container. The Debian host cannot see what is in the container’s /run
directory but can see what is in the container’s /tmp
directory. Is there something special about the /run
directory or is it normal that the host cannot see files in container directories?
root@debian:~# lxc-create -n mycontainer -t download -- -d alpine -r 3.19 -a amd64
root@debian:~# lxc-start -n mycontainer
root@debian:~# ls -alhF /var/lib/lxc/mycontainer/rootfs/tmp
total 16K
drwxrwxrwt 4 root root 4.0K Jan 15 02:34 ./
drwxr-xr-x 19 root root 4.0K Jan 15 02:34 ../
drwxrwxrwt 2 root root 4.0K Jan 15 02:34 .ICE-unix/
drwxrwxrwt 2 root root 4.0K Jan 15 02:34 .X11-unix/
root@debian:~# ls -alhF /var/lib/lxc/mycontainer/rootfs/run
total 8.0K
drwxr-xr-x 2 root root 4.0K Dec 7 09:43 ./
drwxr-xr-x 19 root root 4.0K Jan 15 02:34 ../
root@debian:~# lxc-attach -n mycontainer
~ # ls -alhF /tmp
total 16K
drwxrwxrwt 4 root root 4.0K Jan 15 02:34 ./
drwxr-xr-x 19 root root 4.0K Jan 15 02:34 ../
drwxrwxrwt 2 root root 4.0K Jan 15 02:34 .ICE-unix/
drwxrwxrwt 2 root root 4.0K Jan 15 02:34 .X11-unix/
~ # ls -alhF /run
total 20K
drwxr-xr-x 4 root root 240 Jan 15 02:34 ./
drwxr-xr-x 19 root root 4.0K Jan 15 02:34 ../
-rw-r--r-- 1 root root 4 Jan 15 02:34 crond.pid
---------- 1 root root 0 Jan 15 02:34 crond.reboot
-rw-r--r-- 1 root root 38 Jan 15 02:34 ifstate
-rw------- 1 root root 0 Jan 15 02:34 ifstate.eth0.lock
-rw------- 1 root root 0 Jan 15 02:34 ifstate.lo.lock
drwxrwxr-x 3 root uucp 60 Jan 15 02:34 lock/
drwxrwxr-x 14 root root 340 Jan 15 02:34 openrc/
-rw-r----- 1 root root 4 Jan 15 02:34 syslogd.pid
-rw-r--r-- 1 root root 4 Jan 15 02:34 udhcpc.eth0.pid
-rw-rw-r-- 1 root utmp 0 Jan 15 02:34 utmp