A
A
Andrey2022-04-10 10:07:07
Docker
Andrey, 2022-04-10 10:07:07

How to get information about host file systems from a docker container?

I'm writing a small PHP script to "monitor" the system. There is no need to write about the fact that everything has already been invented and is on the internet, I know, I tried it, but for various reasons none of them fit.
It is planned to use this script in a docker container. All the necessary data has already been collected. it remains only to find out the status of the host disks (volume, busy, mount path, etc.). And so far nothing can be done about them.
Now I use the /bin/df -T command.
It naturally gives information on the container. And here's the question, is it possible to somehow get information about the disks of the host?
I re-read the docker documentation, I realized that there is no easy way. But I did not find the information about the difficult path.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2022-04-10
@karabanov

An application that should collect data about the host system must be run on the host system. An application running in a container is isolated from the host system - that's the point.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question