Page 7 of 11
Re: Oficial Docker Container
Posted: Saturday 01 January 2022 22:46
by wizzard72
wizzard72 wrote: ↑Thursday 30 December 2021 12:14
I'm running domoticz in a docker container. The problem that I have is that my plugin uses the Session() to communicate. If I request a page it takes about 1 minute or longer to complete. On my test VM it takes seconds. This causes the plugin to end unexpectedly. I checked if requests (Session is part of requests) is installed inside the docker container and it is.
Any clue what might be the problem?
Solved it, was a problem with the connection string.
Re: Oficial Docker Container
Posted: Thursday 03 February 2022 16:08
by ferrosk
Thanks for updating docker image domoticz/domoticz:stable with latest stable version 2022.1.
But for testing I need to use also previous stable version 2021.1 and it seems that domoticz/domoticz:2021.1 docker image (updated 3 days ago) contains 2022.1 version instead of 2021.1! Could you check it please?
Re: Oficial Docker Container
Posted: Friday 04 February 2022 16:50
by gizmocuz
Yes, there was a problem in the build script of the stable release... The version tag was hard-coded.
So the first stable was overwritten.
This has been corrected, I will remove the 2021.stable version from the hub
You don't want to use that version anyway
Re: Oficial Docker Container
Posted: Friday 04 February 2022 17:19
by tarmacalastair
Isn't it still useful to have older versions available, for testing?
I'm still trying to resolve a problem introduced between beta 12259 & 12260. It was really difficult to find older versions for testing.
Apologies, my issue is not related to Docker but just agreeing with ferrosk about having an older version available...
Re: Oficial Docker Container
Posted: Friday 04 February 2022 18:01
by Gravityz
if you create/update containers i assume you keep the old container
from that container you can still save that image which you can use for building new containers.
relying on images which you can download is never a good thing because it makes you sensitive and dependent on stuff online
tarmacalastair wrote: ↑Friday 04 February 2022 17:19
Isn't it still useful to have older versions available, for testing?
I'm still trying to resolve a problem introduced between beta 12259 & 12260. It was really difficult to find older versions for testing.
Apologies, my issue is not related to Docker but just agreeing with ferrosk about having an older version available...
Re: Oficial Docker Container
Posted: Friday 04 February 2022 23:55
by ferrosk
gizmocuz wrote: ↑Friday 04 February 2022 16:50
Yes, there was a problem in the build script of the stable release... The version tag was hard-coded.
So the first stable was overwritten.
This has been corrected, I will remove the 2021.stable version from the hub
You don't want to use that version anyway
Thanks Gizmocuz for checking and correcting the build script! As mentioned, I do want to use 2021.1 version for testing

. I'm developing some plugin and need to test it for 2021.1 because I use it for my home automation system and will still use it for some time until I switch to the new stable. (I face an issue with the plugin on 2022.1 although it is running fine on 2021.1. and it seems to be related to changes done in new Domoticz version). As other users mentioned here, it is good idea to keep old versions still available for testing...
Re: Oficial Docker Container
Posted: Saturday 26 February 2022 12:29
by DAVIZINHO
Hello!.
Someone here are runing the version 2022.1.14228 or 2022.1.14223 of docker container?
i must rollback to the 2022.1.14220 because the newest version stop the container with errors
someone with this problems?
Re: Oficial Docker Container
Posted: Saturday 26 February 2022 20:46
by waltervl
DAVIZINHO wrote: ↑Saturday 26 February 2022 12:29
Hello!.
Someone here are runing the version 2022.1.14228 or 2022.1.14223 of docker container?
i must rollback to the 2022.1.14220 because the newest version stop the container with errors
someone with this problems?
Do you use Python plugins? As there was a major change on that. Some plugins still fail. See
viewtopic.php?f=6&t=38086
Re: Oficial Docker Container
Posted: Saturday 26 February 2022 21:13
by DAVIZINHO
waltervl wrote: ↑Saturday 26 February 2022 20:46
DAVIZINHO wrote: ↑Saturday 26 February 2022 12:29
Hello!.
Someone here are runing the version 2022.1.14228 or 2022.1.14223 of docker container?
i must rollback to the 2022.1.14220 because the newest version stop the container with errors
someone with this problems?
Do you use Python plugins? As there was a major change on that. Some plugins still fail. See
viewtopic.php?f=6&t=38086
Thanks a lot. Yes, I use plugings, and its looks this is my problem.
Thanks!
Re: Oficial Docker Container
Posted: Saturday 26 February 2022 21:16
by waltervl
Please post your findings also in that python topic, including crash log.
Re: Oficial Docker Container
Posted: Saturday 26 February 2022 21:31
by DAVIZINHO
waltervl wrote: ↑Saturday 26 February 2022 21:16
Please post your findings also in that python topic, including crash log.
yes, I posted my log in this post, and I try to help with information
Re: Oficial Docker Container
Posted: Thursday 03 March 2022 12:27
by Johanv2600
EDIT: please ignore previous posting. I thought I was comparing behaviour on rpi 3b vs 2b with puzzling differences. However turns out it was 3b vs 1b and differences therefore as expected. Sorry to have wasted your time.
Re: Oficial Docker Container
Posted: Thursday 03 March 2022 19:26
by Johanv2600
EDIT: for the same reason as above post, contents no longer relevant (apart from hoping an arm32v6 image of Domoticz2022.1 may be made available?)
Re: Oficial Docker Container
Posted: Thursday 03 March 2022 20:32
by tarmacalastair
If you scroll back in this thread a bit you will see that I accidentally tried to run the docker image on a Pi1 and had no success. I hadn't even realised it was my very old Pi until I checked it. Same SD card ran fine on a 3b.
Afraid I haven't tested on a Pi2 though I'm afraid....
Re: Oficial Docker Container
Posted: Monday 28 March 2022 23:02
by xxLeoxx93
Hi all,
sorry if I'm not right with this here

I switched to docker recently and it works perfectly. Except one script that used to save a cameraimage localy and attache it to a telegram message.
So far I've used:
Code: Select all
os.execute('wget -O /var/tmp/camsnapshot.jpg http://192.168.178.10:8090/camsnapshot.jpg?idx=1')
os.execute('curl -s -X POST "https://api.telegram.org/bot"xxxxxxxxxxxxxx"/sendPhoto" -F chat_id=-XXXXXXXXX -F photo="@/var/tmp/camsnapshot.jpg"')
Now that doesn't work because I guess domoticz can't access that folder right? But also if I try to save the image to a mounted folder that way (" /opt/domoticz/userdata/camsnapshot.jpg") it will not save anything.
Any clues how I can fix that?
Thanks!
Re: Oficial Docker Container
Posted: Tuesday 12 April 2022 17:37
by Gravityz
did you mount /opt/domoticz/userdata to an external directory?
if so you probably are missing the wget command.
if you terminal your way into the docker container you can install it with
apt-get install wget (maybe first use apt-get -yy update)
please note the docker container only has a very limited kernel without all the known commands(curl is included in recent builds)
Re: Oficial Docker Container
Posted: Thursday 21 April 2022 22:25
by xxLeoxx93
Gravityz wrote: ↑Tuesday 12 April 2022 17:37
did you mount /opt/domoticz/userdata to an external directory?
if so you probably are missing the wget command.
if you terminal your way into the docker container you can install it with
apt-get install wget (maybe first use apt-get -yy update)
please note the docker container only has a very limited kernel without all the known commands(curl is included in recent builds)
Thanks a lot, that did the trick!
The only issue I've now is that I need to roatate the image in between those two lines by 90 degrees and the "convert" command is also not available (install would need a lot of additional packages...)
Re: Oficial Docker Container
Posted: Friday 22 April 2022 7:57
by gizmocuz
Instead of wget you should be able to use curl to download the image
http://www.compciv.org/recipes/cli/down ... with-curl/
Re: Oficial Docker Container
Posted: Thursday 30 June 2022 8:41
by sammyke007
What I do now, is create an image by myself (in Portainer > Images > Build a new image) that includes some packages needed by scripts that I use.
My Dockerfile/code to create this image that I call domoticzpacked:2022.1 looks like this:
Code: Select all
FROM domoticz/domoticz:2022.1
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y \
wget \
oathtool \
jq \
iputils-ping \
nano
This uses the "official" domoticz container with stable v2022.1. You can change this to latest, ...
It adds the packages wget, jq, nano, ... and creates a new image domoticzpacked:2022.1.
I then use Docker Compose (Portainer Stacks) with the following code:
Code: Select all
version: '3.3'
services:
domoticz:
image: domoticzpacked:2022.1
container_name: domoticzpacked
restart: unless-stopped
# Pass devices to container
# devices:
# - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
ports:
- '8080:8080'
- '443:443'
volumes:
- /home/pi/domoticz/:/opt/domoticz/userdata
- /home/pi/domoticz/:/home/pi/domoticz/
environment:
- TZ=Europe/Brussels
- LOG_PATH=/opt/domoticz/userdata/domoticz.log
- WWW_PORT=8080
- SSL_PORT=443
I mount - /home/pi/domoticz/:/home/pi/domoticz/ so I didn't have to change all my paths in my scripts after migrating to Docker.
Re: Oficial Docker Container
Posted: Thursday 04 August 2022 12:16
by DAVIZINHO
hello, I have maybe a stupid question but its inportant to me.
How can I see the status of domoticz in the console?
this command not works:
/etc/init.d/domoticz.sh status
service domoticz.sh status
I have a init script in my setup, and after this script i want to reboot the domoticz.sh but i dont know how to run the status, and then the tipically stop and start of the service
