monitor_docker
monitor_docker copied to clipboard
Question : exposing docker.sock in HA supervisor install
Hello, I use HA supervisor to run HA but like to use this integration. To get this integration to work, I need to go into portainer and edit the volumes of my homeassistant container to add in a bind to docker.sock.
This makes everything run beautifuly.... Until I upgrade HA from the supervisor. This obviously recreates HA using the latest image, but removes the binded volume I've previously added.
I know this is more a docker question, but how can I keep my binded volume, or readd it automatically, after upgrades?
What do other people do?
Thank you.
Hi, same issue here, tried to dig into supervisor code to see how they create the ha container but didn't get far. Maybe this plugin could be reworked somehow to start in own docker image as a supervisor addon, have to take some more time for this, or wait for more help from others.
@craigmcgowan can you share how you add a volume by portainer or show a result of command: docker inspect homeassistant?
@donpablos sure, take a look at https://community.home-assistant.io/t/exposing-docker-sock-for-monitor-docker/265565/10?u=craig_mcgowan and I've explained it there. Let me know if you get stuck.
@craigmcgowan sorry, I don't know to add it automatically during an upgrade either.
Thanks for the reply
Hi All
Good news, someone has told me how to achieve this over at https://community.home-assistant.io/t/exposing-docker-sock-for-monitor-docker/265565/30 using a proxy docker container and connecting to this via TCP instead. Hope this helps anyone else who had this problem.
If this is fixed or resolved, please close this issue.
I have 4 Docker hosts which i monitor using monitor_docker
but liked my Supervised install to be monitored as well. Tried looking into the socket_proxy to allow monitor_docker
to read the container(s) on the Supervised installation. I ended up doing what i do with all my hosts, is expose the Docker API over TCP. More specifically on the IP 127.0.0.1. This allowed me to configure monitor_docker
to connect to the Docker API running in a Supervised installation.