mount - How to list docker mounted volumes from within the container -


want list container directories mounted volumes.

i.e. able similar info from

docker inspect --format "{{ .volumes }}" <self> 

but within container , without having docker installed in there.

i tried cat /proc/mounts can't find proper filter it.

as can read many of comments had, container nothing restricted, reserved part of resources totally cut away rest of machine. not aware of being docker, , inside container behaves if separate machine. sort of matrix, guess ;) access host machine's kernel , resources, yet again restricted filtered out set. done awesome "cgroups" functionality comes unix/linux kernels.

now news: there multiple ways provide information docker, going have provide , build yourself.

the easiest ad powerful way mount unix socket located on host @ /var/run/docker.sock inside of container @ same location. way, when use docker client inside container directly talking docker engine on host. however, great power comes great responsibility. nice setup, not secure. once manages docker has root access host system way.

a better way provide list of mounts trough environment settings, or clinging on made conventions able predict mounts.

(do realize there parameter mounting, give mounts alias inside docker?)


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -