miflora-mqtt-daemon icon indicating copy to clipboard operation
miflora-mqtt-daemon copied to clipboard

CMD in Dockerfile

Open pietrofranceschi opened this issue 5 years ago β€’ 2 comments

Hi Thom, first of all many thanks for your great job! I've got a problem running the daemon within the docker. If I am right the miflora-mqtt-daemon.py has a --config argument, which is instead included as "--config_dir" in the CMD of the Dockerfile. As far as I can see the daemon is not started if the entry in the Dockerfile is not fixed

pietrofranceschi avatar Jun 17 '19 16:06 pietrofranceschi

Hey Pietro! Did you see https://github.com/ThomDietrich/miflora-mqtt-daemon#usage-with-docker Does this solve your issue

ThomDietrich avatar Jun 18 '19 13:06 ThomDietrich

Hi Thom, Thanks for the reply! I followed the usage notes. The only problem I've found (and solved) is that the line CMD [ "python3", "./miflora-mqtt-daemon.py", "--config_dir", "/config" ] in the Dockerfile tells docker to run

"python3 ./miflora-mqtt-daemon.py --config_dir /config"

but the execution help specifies that the right command should include the " --config" argument (not the "--config_dir")

python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py --config /opt/miflora-config

To make the daemon starting I've been fixing the Dockerfile. Afterwards, everything was working perfectly

kind regards!

Pietro

pietrofranceschi avatar Jun 18 '19 14:06 pietrofranceschi