monitor_docker icon indicating copy to clipboard operation
monitor_docker copied to clipboard

Question : exposing docker.sock in HA supervisor install

Open craigmcgowan opened this issue 4 years ago • 8 comments

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.

craigmcgowan avatar Jan 09 '21 06:01 craigmcgowan

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.

fspralja avatar Jan 18 '21 07:01 fspralja

@craigmcgowan can you share how you add a volume by portainer or show a result of command: docker inspect homeassistant?

donpablos avatar Feb 17 '21 06:02 donpablos

@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 avatar Feb 17 '21 07:02 craigmcgowan

@craigmcgowan sorry, I don't know to add it automatically during an upgrade either.

ualex73 avatar Mar 21 '21 11:03 ualex73

Thanks for the reply

craigmcgowan avatar Mar 21 '21 14:03 craigmcgowan

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.

craigmcgowan avatar Mar 29 '21 19:03 craigmcgowan

If this is fixed or resolved, please close this issue.

ghost avatar May 05 '21 10:05 ghost

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.

niek1992 avatar Oct 05 '21 15:10 niek1992