Page 1 of 1

Official Docker images

Posted: Sunday 08 April 2018 4:15
by glc255
Hi,

I'm just wondering if there are any plans from the Domoticz team to provide *official* Domoticz Docker images (example) for many architectures (mainly ARM for containers running on Rasperry Pi, and AMD64 for other platforms) on the official downloads page, for both stable and beta/master builds in the next months.

I perfectly know and understand that :
  • The domoticz team already provide many versions for different platforms : Raspberry Pi, Linux, Windows, MacOS, Synology, FreeNAS, which is excellent, and quite a huge work to build and maintain.
  • Yet another Docker platform is also time-consuming to provide and maintain
But on the other hand :
  • Docker hosts are now available on all aforementioned platforms (except maybe FreeNAS, at the moment)
  • Docker containers let you easily transfer or migrate your existing Domoticz app to any other server or platform
  • Docker containers let you easily run and preserve your home automation app across different CPU architectures, even in case of backups and maintenance (example) and solution-agnostic custom and external home automation apps, consuming the Domoticz API (from and through PHP, Node.js, Python, FibaroLink and so on)
  • Maintainers such as Joshuacox and the LinuxServer team (thanks to them, among others) are doing a great work to provide and maintain unofficial Domoticz / Docker images, but this currently leads to quite scattered and incompatible Docker images across Domoticz versions and Docker host platforms/architectures (#unstable)
  • Working Dockerfiles are already available from these maintainers, as mentioned in the official Domoticz Wiki, but what if they aren't available anymore (in the future), to provide these unofficial builds ? (#unstable)
  • The Docker ecosystem is now really mature and popular enough
  • Most server apps are now available as Docker official images
  • Recent versions of Raspberry Pi with quad cores and 1 GB RAM are now more than sufficient to run Docker containers
  • Domoticz compatibility with a huge number of manufacturers and protocols is just unbeatable IMHO, and making Domoticz apps portable and deployable through Docker containers would therefore be a huge value
This would be a question/suggestion especially to Gizmocuz, but also to many others, any thoughts or comments, guys ? ;)

Re: Official Docker images : Any plans ?

Posted: Sunday 08 April 2018 14:52
by remb0
I get your point and agree with all the suggestions. but I can't do this and I can't force somebody :P hehe

Re: Official Docker images : Any plans ?

Posted: Sunday 08 April 2018 20:32
by gizmocuz
Hosting a docker image on a raspberry... Yes that works but do just install Domoticz on it is much easier
Copying the folder or image is no big deal,
Or if you use everything within the platform a simple database backup is sufficient and can be restored very easy

As you mentioned... Maintaining all our platforms is a huge amount of work and resources already

If you want to help the current Domoticz docker builders that's more then welcome of course, but I can't also support all docker architectures ...

Re: Official Docker images : Any plans ?

Posted: Monday 09 April 2018 0:36
by glc255
Hmmm... , thanks a lot for your feedback guys, @remb0 @gizmocuz ;)

I understand some of the image maintenance aspects, but there are cases (like mine, and probably others) where Domoticz is a main component of a custom app, which must be migrated as a whole between two devices (core I7/amd64 and Raspi/arm) when one of the devices is under maintenance, or portable when I switch to a new device, without having to deal with new API URLs, new local installs and so on...

I just git clone my project on any device and everything (including Domoticz) is automatically set (except the manual USB port assignment), or replicated through a bash command between master and slave devices, this is where the Docker magic occurs, especially with official/reliable images ;)

Anyway, thanks again, guys, for your fast feedback and your great work on Domoticz in general, take care ;)

Re: Official Docker images : Any plans ?

Posted: Monday 09 April 2018 22:17
by kofec
I was also thinking about it because currently domoticz is not stable(many versions of libssl) on raspbian 9 stretch when you use many python plugins - which I like :-)
I have tested joshuacox/mkdomoticz but It has some issue and docker file is not small. I'm also fan of Openwrt project and I have domoticz on platforms like: kirkwood (nas NSA310), rampis (Xiaomi 3G), ar71xx (wdr3500 and wdr3600) and of course brcm2708 (Rpi 1)
https://github.com/openwrt/packages/tre ... s/domoticz
but there are some limitation - no compiler on target so it is difficult to install some python packges.
but the docker file has only 6MB:
https://hub.docker.com/r/nmaas87/rpi-openwrt/
The domoticz package is easy and fast to compile thanks to great environment(cross-compiling) prepared by openwrt project
When I find a time I will test this solution and let you know

Re: Official Docker images : Any plans ?

Posted: Monday 09 April 2018 23:01
by ben53252642
Personally I am not a fan of docker, I find the whole concept confusing to say the least.

I agree with what others have said, just install Domoticz (mine runs in a virtual machine).

Re: Official Docker images : Any plans ?

Posted: Wednesday 11 April 2018 16:24
by glc255
ben53252642 wrote: Monday 09 April 2018 23:01 Personally I am not a fan of docker, I find the whole concept confusing to say the least.

I agree with what others have said, just install Domoticz (mine runs in a virtual machine).
The suggestion on this thread was about providing official Docker images for Domoticz, which would be necessarily designed for people understanding Docker's concepts, and how to use it.

I'm using Domoticz in Docker containers on both ARM and X86/AMD64, and it works great (no need to install Domoticz again and again), and I much prefer to use a yaml file with 23 lines of definitions for a Domoticz container, rather than setting a plain old (and slow) virtual machine, consuming gigabytes of RAM at full time (which would be impossible on a lightweight device, such as a Raspberry Pi, anyway) :)

Re: Official Docker images : Any plans ?

Posted: Wednesday 11 April 2018 17:16
by glc255
Following my initial post :
...
  • Maintainers such as Joshuacox and the LinuxServer team (thanks to them, among others) are doing a great work to provide and maintain unofficial Domoticz / Docker images, but this currently leads to quite scattered and incompatible Docker images across Domoticz versions and Docker host platforms/architectures (#unstable)
...
For those interested, I ended up with Docker / Domoticz LinuxServer.io images, actually provided in different versions (including stable) for most platforms :

x86/amd64 : DH | GH
arm32 : DH | GH
arm64 : DH | GH

Sample docker-compose.yml file :

(Raspberry Pi image example, for other platforms, just change the value of DOMOTICZ_IMAGE, to match the image tags available in the DH links above, and eventually the label of your output image, by replacing the value of 'image: domoticz:armhf' with something more relevant in your context).

Code: Select all

version: '3'
services:
  domoticz:
    container_name: domoticz
    image: domoticz:armhf
    restart: unless-stopped
    volumes:
      - ./cont/domoticz/data:/config
      - ./cont/domoticz/build/keys:/config/keys
      - ./cont/domoticz/scripts/lua:/config/scripts/lua
      - ./cont/domoticz/scripts/python:/config/scripts/python
    privileged: true
    ports:
      - '8080:8080'
      - '6144:6144'
    expose: 
      - '8080'
      - '6144'
    tty: true
    build:
      context: ./cont/domoticz/build
      args:
        DOMOTICZ_IMAGE: lsioarmhf/domoticz:stable-3.8153
        LUA_VERSION: 5.3
    environment:
      - PUID=1000
      - PGID=1000
Here, I'm using a custom Dockerfile (located in ./cont/domoticz/build) to add Lua support for my Lua device trigger scripts on top of Linuxserver.io images :

Sample Dockerfile :

Code: Select all

ARG DOMOTICZ_IMAGE
FROM ${DOMOTICZ_IMAGE}

ARG LUA_VERSION=5.3

# Install packages
RUN apk add lua${LUA_VERSION} && \
    ln -s /usr/bin/lua${LUA_VERSION} /usr/bin/lua

CMD [ "/bin/bash" ]
The reason of PUID/PGID=1000 is explained in the DH|GH links above (you may want to change this value, to match your own host user).

This is all kind of code you need, to set a Domoticz container (and run it with docker-compose up -d)

Hope this helps, adapt it to fit your needs, enjoy ;)

Re: Official Docker images

Posted: Wednesday 31 October 2018 21:15
by dyter
Domoticz from linuxserver have many bugs, personnal icons not works for exemple or ping system keep alive doesn't work ...

I use cgatay/domoticz because is allways in last version and work fine but have no ssl keys:
https://hub.docker.com/r/cgatay/domoticz/

Re: Official Docker images

Posted: Tuesday 27 November 2018 9:29
by Jay74
dyter wrote: Wednesday 31 October 2018 21:15 Domoticz from linuxserver have many bugs, ...
Hi,
talking about bugs, is there any specific topic for bugs related to docker version?
I found one that is quite annoying and it surprise me that almost no one reported it.
I think that a specific topic related to bugs dealing with docker could be useful.

Thank you

P.S: topic for the problem can be found here
any help is really welcome ;)

Re: Official Docker images

Posted: Sunday 09 December 2018 12:04
by dyter
I use cgatay docker on synology X64, and I have zero bug.

I redirect many folders for Template, Plugins or SSL Keys HTTPS ... for exemple to work

Image

Re: Official Docker images

Posted: Thursday 15 August 2019 0:45
by alexsahka
dyter wrote: Sunday 09 December 2018 12:04 I use cgatay docker on synology X64, and I have zero bug.

I redirect many folders for Template, Plugins or SSL Keys HTTPS ... for exemple to work

Image

Could you post full setting (screenshots) of your Synology/Docker/Domoticz setup? I have trouble redirecting folders as you posted above, the Docker container is always rebooting.

Re: Official Docker images

Posted: Friday 16 August 2019 20:02
by phoenixblue
Hi,

Maybe an strange question (I'm an beginner in Docker).
I have install docker on windows 10 and have get download and install the Domoticz container.
But when I run in from the command prompt it run only with the ip adres 0.0.0.0.0

Where can I change those settings so I can run it from my local network.

Re: Official Docker images

Posted: Wednesday 28 August 2019 12:28
by DAVIZINHO
Hello,
I have a docker install in a synology nas and works fine (the linuxserver container).
But im trying to configure more things of my legacy domoticz :-)

Now my problem are:

- I cant configure gnotify :-( to send phrases to my google home
- I cant define crontab scripts. i need a script to launch automatically every 5 minutes. In a raspberry is easy with crontab, but in docker???

Re: Official Docker images

Posted: Wednesday 04 December 2019 22:12
by RobvdB
Hi,

Sorry if this has been adressed before but I'm unable to find this. I've installed the joshuacox docker container and so far, all runs fine. Only problem I have is to get SSL (HTTPS) up and running. I can see it in the domoticz.sh , I have opened the ports, but I can only access the http interface. I don't want to go unprotected, what do I do to get 443 up and running? Surely I'm overlooking something, but what?

Best
Rob