Hello,
I’m trying to move my openhab to docker, and having problem with the exec binding.
I’ve mounted volume to directory with jar to run some logic and exec some logic.
In my raspberry the logic works great, in the docker I don’t see any errors in the log but the process not run… (no mq update) if I’m running it inside the docker (login to the container using bash) it is working…
any ideas why?
I’ve tried, the echo command is working great… but still the java run program not running, the result of the exec is null…
I’ve tried to specific the location…
this is the command:
executeCommandLine("/usr/bin/java@@-jar@@/home/me/calc-mqtt.jar",60000)
It might be the case that Docker will not allow you to execute a file mapped into the container. I don’t know if that is the case but if it is that would be an awesome security feature.
I’ve found out the problem.
I had to login into the container and add permissions to /home/me directory…
I don’t understand why since I set the permission of the directory from the docker machine to 777…
any way to change it already when I’m creates the docker?
(using docker run command?)
You would have to rebuild the container to make the change when the image is created or modify the entrypoin.sh script to do it for you. Both require modifications to the Dockerfile.