Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] - How to setup up the script in a docker container? #214

Open
Falerion-git opened this issue Jun 22, 2024 · 1 comment
Open

Comments

@Falerion-git
Copy link

I ran the script previously fine together with iobroker on a rasp pi 4.
Now I wanted to try out the homeassistant OS and running the script in a docker container.

I can't get it to create the container and run the script with the provided docker run command.

I have all files from the latest release in one folder, created a HymilesZeroExport_Config_Override.ini file. (from my previously working instllation)
I also have the Dockerfile and the compose.yaml in that directory.
Then running the provided command

docker run -d --name hoymileszeroexport \ -v ${PWD}/HoymilesZeroExport_Config_Override.ini:/app/HoymilesZeroExport_Config_Override.ini \ ghcr.io/reserve85/hoymileszeroexport:main -c ./HoymilesZeroExport_Config_Override.ini

I then get the error message

docker: Error response from daemon: error while creating mount source path '/root/HoymilesZeroExport/HoymilesZeroExport_Config_Override.ini': mkdir /root/HoymilesZeroExport: read-only file system.

I guess I'm missing something here?
Could someone provide a short step by step description how to setup such a container? Or point out which step I'm missing?
Thanks in advance!

-Falerion

@tomquist
Copy link
Contributor

tomquist commented Jun 22, 2024

Looks like you’re mounting the config file from a read only file system. You could try mounting as read-only:

docker run -d --name hoymileszeroexport \
   -v source=${PWD}/HoymilesZeroExport_Config_Override.ini,destination=/app/HoymilesZeroExport_Config_Override.ini,readonly \
    ghcr.io/reserve85/hoymileszeroexport:main -c ./HoymilesZeroExport_Config_Override.ini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants