Closed wrzlbrmft1 closed 6 months ago
what's the command you are using to run it via docker?
I use it like this template
docker run -d --restart=unless-stopped -v ./parameter.json:/app/parameter.json -e ISM7_MQTTHOST=<mqttserver> -e ISM7_IP=<ism7 ip/host> -e ISM7_PASSWORD=<ism7 password> zivillian/ism7mqtt:latest
with my parameters of mqtt, hosts and password
if I'm correct you need to use a bind mount. This is the relevant part of the docker compose I'm using:
volumes:
- type: bind
source: /opt/ism7-parameter.json
target: /app/parameter.json
so something like docker run -d ... --mount type=bind,source="$(pwd)"/parameter.json,target=/app/parameter.json -e ...
should work.
. . . thanks a lot for this suggestion. I did it like this:
-v /home/<user>/parameter.json:/app/parameter.json
this works at the moment
I tried to run ism7mqtt via docker, but there was a failure:
docker: Error response from daemon: create ./parameter.json: "./parameter.json" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
What's the correct parameter? Where should the file parameter.json be located?