Official Docker images

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
glc255
Posts: 5
Joined: Sunday 08 April 2018 2:51
Target OS: -
Domoticz version:
Contact:

Official Docker images

Post 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 ? ;)
Last edited by glc255 on Thursday 12 April 2018 19:36, edited 1 time in total.
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Official Docker images : Any plans ?

Post 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
User avatar
gizmocuz
Posts: 2352
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Official Docker images : Any plans ?

Post 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 ...
Quality outlives Quantity!
glc255
Posts: 5
Joined: Sunday 08 April 2018 2:51
Target OS: -
Domoticz version:
Contact:

Re: Official Docker images : Any plans ?

Post 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 ;)
kofec
Posts: 53
Joined: Friday 16 September 2016 14:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Official Docker images : Any plans ?

Post 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
ben53252642
Posts: 543
Joined: Saturday 02 July 2016 5:17
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Official Docker images : Any plans ?

Post 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).
Unless otherwise stated, all my code is released under GPL 3 license: https://www.gnu.org/licenses/gpl-3.0.en.html
glc255
Posts: 5
Joined: Sunday 08 April 2018 2:51
Target OS: -
Domoticz version:
Contact:

Re: Official Docker images : Any plans ?

Post 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) :)
Last edited by glc255 on Sunday 15 April 2018 0:15, edited 2 times in total.
glc255
Posts: 5
Joined: Sunday 08 April 2018 2:51
Target OS: -
Domoticz version:
Contact:

Re: Official Docker images : Any plans ?

Post 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 ;)
User avatar
dyter
Posts: 40
Joined: Thursday 08 February 2018 15:48
Target OS: NAS (Synology & others)
Domoticz version: 8841
Location: Lyon
Contact:

Re: Official Docker images

Post 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/
Domoticz v2024.1 on Synology Docker host, RFLink, ESPEasy wemos D1, Ecodevices, relays x8, dahua doorbell, reolink cameras ....
Jay74
Posts: 3
Joined: Tuesday 10 April 2018 14:05
Target OS: Linux
Domoticz version:
Contact:

Re: Official Docker images

Post 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 ;)
User avatar
dyter
Posts: 40
Joined: Thursday 08 February 2018 15:48
Target OS: NAS (Synology & others)
Domoticz version: 8841
Location: Lyon
Contact:

Re: Official Docker images

Post 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
Domoticz v2024.1 on Synology Docker host, RFLink, ESPEasy wemos D1, Ecodevices, relays x8, dahua doorbell, reolink cameras ....
alexsahka
Posts: 4
Joined: Friday 04 November 2016 21:01
Target OS: NAS (Synology & others)
Domoticz version: 3.5837
Contact:

Re: Official Docker images

Post 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.
User avatar
phoenixblue
Posts: 76
Joined: Friday 25 November 2016 11:20
Target OS: Windows
Domoticz version:
Contact:

Re: Official Docker images

Post 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.
DAVIZINHO
Posts: 234
Joined: Sunday 27 August 2017 18:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spain
Contact:

Re: Official Docker images

Post 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???
RobvdB
Posts: 8
Joined: Wednesday 29 June 2016 20:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Official Docker images

Post 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
Synology DS213, RFXtrx433E, COCO, HomeEasy, Promax, Denon, Philips TV, Logitech Harmony, Nest, Smart meters.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest