I’m running a container installation on Ubuntu and am having a strange issue.
I recently installed HACS by running the install script inside the container. I was having all sorts of trouble getting it configured, so I looked inside the custom_components directory in my home folder and found it was empty. I was baffled, so I ran bash inside the container (sudo docker exec -it <id> bash
) and found the custom_components directory had the expected content. I also noticed that the configuration.yaml file inside the container was an older version that didn’t reflect recent changes I’d made.
I checked the mount bindings and everything was correct. Then I made a big mistake: I restarted the container in hopes that it would sync its file system to my host file system, but the opposite happened. The outdated configuration folder on the host system was synced to the container, and I lost nearly all of my configuration.
I know my configuration is almost certainly lost for good, which is super demoralizing. But what caused the out-of-sync behavior in the first place? How can I avoid it, or fix it correctly if it happens again?