Config files are not in docker container but on docker host

Hi. I’m rebuilding an old, established HA environment after a big fatal crash and have decided to go the docker route. I’ve gone Photon and docker combination. I had two issues, firstly I couldn’t get the GUI up so switched off network mode and published 8123 as a port on the homeassistant container. Now I’ve noticed that my configuration.yaml and a few other bits are on my Photon host when I was expecting them to be in my container. Is that normal? Am I worrying about something I shouldn’t?!

Be gentle :slight_smile: Thanks

Photon is server host?

Docker is runtime not VM so files would physically exist and be visible on the host server in a folder that you choose. It will not be separated on host in any manner unless you make it so.

You generally “bind mount” the host folder to a folder inside the docker container

-v /srv/YourHAFiles/config:/config

Bind mount works like symlink mapping the file or folder in docker container to those on the host and allows Persistence so that upon restart, the files don’t revert to that container default state. Docker is Not VM where it has its on own storage and you change and modify files in VM. Docker is meant to be static system that’s provided some storage and access to files only when setup to be as such.

If your new to docker I recommend looking at Portainer. It is basically a UI for docker and will help a lot. Also read through dockers documentation to understanding port mapping, bind mount vs volume, and docker networking as those will be main difficulty. After that maybe move to running containers as non root user.

I probably not give perfect info but hope it helps

1 Like

I think that helps! I hadn’t appreciated that a Docker container is static and was definitely carrying through my VM knowledge, limited as that is, into the Docker environment.

Yes Photon is the server host, VMWare’s slim unix build which has Docker natively enabled.

There are definitely some improvements that could be made to the Docker installation page.

So I just need to tar the files in /srv/YourHAFiles/config and I’ve got a backup of my installation?