Docker - access HA code

Hi all
running HA in Docker on Synology NAS. How do I access the HA install files?

You’ll need to use something similar to this with your appropriate container name:

docker exec -it home-assistant bash

1 Like

What install files are you trying to access? The configuration? I suggest bind mounting a volume with your configuration in it, so it doesn’t disappear when you delete your docker container.

1 Like

Perhaps an obvious question for developers, but I’m still trying to fathom how to access /components files, just as was probably the crux of the original question of @robmarkcole .

I’m ssh(ed) on port 22222, I can see the docker containers and log into them, but I must be missing something as I can’t find the relevant components files.

Anybody can provide an idiot proof advice? Thanks.

Why do you need access to those files? You can very easily create custom_components in your config directory which you can modify at will

For troubleshooting some components. I do know about the custom_components, but would prefer to access the original files, as that doesn’t leave the override in place once the fix has been merged to the master branch.

So in response to the question? Is it possible?

Once the fix is merged and pushed to a docker build u just delete the custom component and any deps it installed.

Doing it your way you need to mount the folder in a volume for the container and manually update the volume each time for every update.

Yes. It’s possible. The docker file will tell you exactly the location of the directory, but when you restart the container, your changes will be lost. So it’s kind of a waste of time to do it that way.