is it an addon? There is a HA dockermon I use that is an external docker container which is loaded by docker-compose so not exactly sure what you are trying to do. What HA did you install?
It’s https://github.com/ualex73/monitor_docker
It gives a lot more info about the containers tha HA dockermon (I believe, not used it though but just reading the docs).
I believe it was written to get the best from HA dockermon and a precious docker_monitor add-on which are both no longer developed?
Anyway, I think that dockermon runs as a container, so can always re-bind docker.sock when you update it, however monitor_docker is an integration within HA so when HA is updated, there is no reason for it to rebind the .sock
yeah so I was confused because you called it an addon whereas it’s an integration.
You didn’t say what you installed but I’m guessing it’s HA OS?
What exactly are you trying to do with it? You don’t have that many options for this with HA OS but maybe you can get the functionality you want using Glances…
Monitor_Docker does exactly what I want it to do so id rather stay with that as its tidier (assuming I could get the .sock to bind every time). Ill send a picture of my dashboard with this information on later this eveing.
I could get the same info but would need to user HA dockermon and Glances so would be more work.
Im running Home Assistant as a Docker image on Ubuntu.
If it’s not a supervised install you should be able to make it stick from the command line then and use docker-compose as per the instructions. Even with supervised (non HA OS) you should be able to do that I would have thought
The problem is that I dont use docker-compose to recreate the home assistant instance upon upgrade, I just click “Upgrade” from the Supervisor section of HA.
and you shouldn’t do that anyway… let the supervisor manage HA as it’s intended.
But I don’t understand why you don’t just use docker-compose with say a script and a cronjob at the OS level - that’s what I do. I have a HA supervised install and I use docker-compose only to manage some extra non-HA containers and a cronjob basically checks for updates to the images for those containers every 12 hours and updates as required.
How are you even making this run from inside HA anyway? Are you ssh’ing into the HA container to do the mapping? Have you considered using portainer to create a stack to do this? Theres a bunch of easy ways to make this work but maybe I’m just not understanding what you are trying to do.
I could create the exact same dashboards using hadockermon as you are and get everything there using Glances except the restart buttons…
Error:Missing valid docker_host.Either DOCKER_HOST or local sockets are not available. Answer: Most likely the socket is not mounted properly in your Home Assistant container. Please check if you added the volume /var/run/docker.sock
Hi @basti4k
In portianer, go to your homeassistant container. Scroll down to the Volumes.
You should not see /var/run/docker.sock listed which is the problem.
Scroll back up to Edit the container. Then go into the Volume section and “map additional volume”.
Add in /var/run/docker.sock from the Container and bind it to /var/run/docker.sock in the host.
Then rebuild the container. Check back in the container at the volumes and check its now a binded volume. If it is, monitor_docker should now work for you
My problem is that every time Home Assistant is updated, I need to redo this step.
Hi @Craig_McGowan thanks for the fast Solution.
But i dont have a “Edit” Button. Only “Duplicate/Edit”.
i can add the Volume, but i dont see a “Save” Button.
at the top:
Caution
The new container may fail to start if the image is changed, and settings from the previous container aren’t compatible. Common causes include entrypoint, cmd or other settings set by an image.
Unfortunately it won’t and you will need to re-bind the volume.
This is the problem I have and why I opened this thread.
If you manage to work out a way to keep it persistent through upgrades please let me know.
I don’t believe it’s an issue. It’s just as HA recreates it’s container when upgrading with its set variables and this isn’t one of them. I have asked in git for the monitor_docker page for help but no feedback as of yet.