I have a python Flask app running in a docker container, along with several other apps and an nginx reverse proxy. Some of the other apps write log files to volumes mounted from the host. Some of these apps are not well behaved, and sometimes use up all of the available disk space. I would like my app to report back the result of a "df" command run on the docker host. What would be the best way to do this?
Running
subprocess.getoutput('df')
only shows the df from the docker container, not from the host machine.