I am currently trying to understand how Docker handles volume installations and encounters the following behavior, which seems to me to be unbalanced:
It is assumed that we want to set the / var / run directory to a container (as an example), we do the following:
$ docker run -i -t -v /var/run:/test ubuntu:latest /bin/bash
So far, everything is working fine, and all folders and files located in / var / run are displayed inside the container inside the / test.
Now let's see what happens if we decide to install the / var directory:
$ docker run -i -t -v /var:/test ubuntu:latest /bin/bash
However, all host folders inside / var are displayed inside / test. However, after running cd in / test / run, files and directories from the host are not displayed. In other words, Docker does not seem to "recursively" mount subsequent child directories and their contents. Is this Docker's usual behavior?
source share