Yes.
I do not use docker yet so cannot advise but would it possible to manually create this folder in the docker env. and set the rights in such a way that domoticz can write these scripts?
Moderator: leecollings
Yes.
Is this something that can be done with the Docker composer file so you do not have to do this everytime you update the Domoticz docker image?
Thanks, tried both and first says: OCI runtime exec failed: exec failed: container_linux.go:367: starting container process caused: exec: "wget": executable file not found in $PATH: unknown
Code: Select all
apt-get update
apt-get install wget
Just moved from docker container Linuxserver/Domotiz 2020.2 version to official Domoticz docker 2022.1 and got the exact same problem. Creating the directories solved the issue, but the root cause seems to be that the container creates the scripts-directory in /opt/domiticz/scripts/, while Domoticz expects it to be at /opt/domoticz/userdata/scripts/Experimenting further with scripts on the official docker image i notice that blocky scripts are generated ok but on the dzvents part it fails with:i suspect this is because of a issue with read/writing rights in the container.Code: Select all
2021-03-18 21:19:18.108 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Script #2.lua 2021-03-18 21:19:18.108 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Script #2.lua
I tried to set the correct rights through putty with:Code: Select all
docker exec -it DomoTest chmod -R 777 /opt/domoticz/userdata/
Just moved from docker container Linuxserver/Domotiz 2020.2 version to official Domoticz docker 2022.1 and got the exact same problem. Creating the directories solved the issue, but the root cause seems to be that the container creates the scripts-directory in /opt/domiticz/scripts/, while Domoticz expects it to be at /opt/domoticz/userdata/scripts/Emax wrote: ↑Thursday 10 March 2022 13:32 Experimenting further with scripts on the official docker image i notice that blocky scripts are generated ok but on the dzvents part it fails with:i suspect this is because of a issue with read/writing rights in the container.Code: Select all
2021-03-18 21:19:18.108 Status: dzVents: Write file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Script #2.lua 2021-03-18 21:19:18.108 Error: EventSystem: problem writing file: /opt/domoticz/userdata/scripts/dzVents/generated_scripts/Script #2.lua
I tried to set the correct rights through putty with:Code: Select all
docker exec -it DomoTest chmod -R 777 /opt/domoticz/userdata/
This is about fixing the issue, I wonder about what is causing the issue. Why are those directories not created when installing the container? And why do I have and /opt/domoticz/scripts with has all the directories that are missing under /opt/domoticz/userdata/scripts, while these directories are not used from /opt/domoticz/scripts. To me that sounds like the scripts directory was created in an incorrect folder when installing the docker container.Gravityz wrote: ↑Thursday 10 March 2022 13:45 You need to mount /opt/domoticz/userdata to a directory outside of the container
once you do that the script directory under userdata is used
after that manually(only once) create the following directories to that place
in my case
i mounted external directory domoticz/docker to /op/domoticz/userdata
after that i created on my synology
/volume1/docker/domoticz/scripts/dzVents/generated_scripts
/volume1/docker/domoticz/scripts/dzVents/scripts
/volume1/docker/domoticz/scripts/logrotate
/volume1/docker/domoticz/scripts/templates
I'm going to switch to a Dockered Domoticz and I need wget, jq and oathtool for scripts. This does indeed work, but I guess this installs inside the container so you'll have to run command after each update / container recreation, correct?waltervl wrote: ↑Tuesday 08 February 2022 13:52 Open Docker on your Synology, go to the Domoticz container, select Details, Terminal, and open 'bash'.It perhaps is needed to use 'sudo' in front of these commands.Code: Select all
apt-get update apt-get install wget
Users browsing this forum: No registered users and 1 guest