Hi all,
I’m trying to run a Python script from the base OS to monitor HomeAssistant with my monitoring software. It needs to be run from the host since the dockers themselves are monitored with commands such as docker ps
.
I’m able to run Python from the homeassistant
or the hassio_supervisor
containers. However, copying my script in there doesn’t help since the script running within the container doesn’t have access to the host machine.
# docker exec -it homeassistant python /tmp/mk_docker.py
mk_docker.py: Does not seem to be a docker host. Terminating.
I’m not an expert on the matter but I’m starting to think that what I’m trying to do is impossible. I’d need to rewrite the Python script into a bash script to be able to run it from the host. Unless I’m missing something obvious here (hence my question).