Official Docker images

Support for the docker image maintained by dlandon
Post Reply
jakob.tewes
Posts: 2
Joined: Mon Mar 07, 2022 12:20 pm

Official Docker images

Post by jakob.tewes »

Heyhey ZoneMinder Forum,

coming up with a question concerning the supported docker images.
Even after some reading and testing, I´m having no idea what might me "the official" docker containers for current zoneminder.

I´ve tested so far:
zoneminderhq/zoneminder:latest-ubuntu18.04
dlandon/zoneminder:latest
dlandon/zoneminder.machine.learning:latest

Both tend to be not really up to date and also I´ve seen some info concerning deprecation in the "dlandon/zoneminder*" images

Can someone help me plz? :-)

Regards

Jakob
User avatar
iconnor
Posts: 2709
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Official Docker images

Post by iconnor »

Simple: Official Docker images will come from ZoneMinder. No one else. So there are none.

We are testing https://github.com/zoneminder-container ... inder-base for demo.zoneminder.com. Have played with dlandon's in the past.

There are too many conflicting tastes/ideas about how this should all be done. You are going to have to figure out which ones suits you best.
jakob.tewes
Posts: 2
Joined: Mon Mar 07, 2022 12:20 pm

Re: Official Docker images

Post by jakob.tewes »

Nice! Helps! Going in with the test :-)
jantman
Posts: 12
Joined: Tue May 08, 2018 11:21 am
Location: Atlanta, GA, USA
Contact:

Re: Official Docker images

Post by jantman »

The dlandon images are definitely marked as deprecated.

The "official" images (zoneminderhq/zoneminder) violate almost all of the Docker-published best practices for images, and on top of that only have a "latest" tag so you'll end up getting image updates when you don't want to or even know (another of the Docker best practices for images).

I've been using a very minimally-modified fork of https://hub.docker.com/r/quantumobject/ ... zoneminder for 2 years now, which meets most best practices for Docker images, but unfortunately is still at 1.34.22 and appears abandoned. I guess I'm going to take a crack at updating my fork for the latest 1.36.

For those who don't deal with Docker on a day-to-day basis, the best practices that I refer to come from Docker development best practices and Best practices for writing Dockerfiles, and the important points boil down to:
  • Everything "set up" in the image should be done at build time not run time (i.e. any package installation, file creation, etc. should be in the Dockerfile not the entrypoint). Entrypoints should be optimized for speed, and if you and I run the same image, what's inside it should always be the same.
  • Tags on a docker image should be immutable and thought of like package versions, i.e. running the "zoneminderhq/zoneminder:1.36.19-1" image should always and forever result in the exact same image (like an OS package version). If my computer falls into a pool of lava and all of its backups are eaten by a monster, I should be able to pull and run "zoneminderhq/zoneminder:1.36.19-1" on my new computer and get the same EXACT thing.
  • I know this is essentially impossible for ZM, but the Docker model is built around one process or service per container, without any sort of supervisor/init/process manager in the container.
  • Docker is really a packaging format, much like dpkg or rpm. The fact that the official images offer a choice of CentOS or Ubuntu base images is just creating more work for the maintainers. The base image shouldn't matter to users, and maintainers should pick whatever is easiest or makes most sense for them and what they're packaging.
I can't offer to maintain a Docker image long-term, but I'd certainly be willing to take a crack at making an image for the current ZM version that follows Docker's guidelines and best practices.
Lead Developer, Release Engineering Automation & Tooling - Some Company
homepage / blog / github
User avatar
iconnor
Posts: 2709
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Official Docker images

Post by iconnor »

@jantman: Why don't you work with us, the other devs and you can be the official docker maintainer.
jantman
Posts: 12
Joined: Tue May 08, 2018 11:21 am
Location: Atlanta, GA, USA
Contact:

Re: Official Docker images

Post by jantman »

iconnor wrote: Wed Jun 22, 2022 1:23 am @jantman: Why don't you work with us, the other devs and you can be the official docker maintainer.
Ok, I'd certainly be open to that. Let me start by trying to get a working image for the latest release that follows as many of the best practices as possible, and then I'll share a link to the repo and see if we can get a discussion going about it. It'll probably take me a week or two, as I've got a really busy week coming up.
Lead Developer, Release Engineering Automation & Tooling - Some Company
homepage / blog / github
User avatar
iconnor
Posts: 2709
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Official Docker images

Post by iconnor »

Please also checkout https://github.com/zoneminder-containers

The author doesn't use them himself, but is active in our slack channel. They are currently powering https://demo.zoneminder.com
good4y0u
Posts: 3
Joined: Sun Jul 11, 2021 3:28 am

Re: Official Docker images

Post by good4y0u »

Well, a year later I am trying to figure out this same question. I am on quantumobject/docker-zoneminder:latest which doesn't exist anymore (its over 2 years old now) (See https://wiki.zoneminder.com/Docker )

What is the latest docker image I should be using so I can update from v1.34.23 to the latest release of v1.36.33
moorsey
Posts: 53
Joined: Sun Jan 03, 2010 8:56 am

Re: Official Docker images

Post by moorsey »

I think the auto building ones iconner posted above are your best bet - https://github.com/zoneminder-container ... inder-base
jantman
Posts: 12
Joined: Tue May 08, 2018 11:21 am
Location: Atlanta, GA, USA
Contact:

Re: Official Docker images

Post by jantman »

Unfortunately I never did anything with this (or at least haven't yet). I'm only using ZM for personal stuff at home, and building a new Docker image so I could upgrade a system that's perfectly functional... rapidly fell down my priority list. Add to that the fact that I haven't worked with PHP or Perl in over a decade, so I doubt that properly crafting a Docker image would be a quick thing for me.

I'm currently running off of a fork of quantumobject/docker-zoneminder:1.34.22-1 that adds a few minor features - symlinking zmeventnotification_secrets.ini into the proper location, apache2 mod-headers enabled, and allowing an optional apache zoneminder.conf site config to be mounted in to the container (the latter two so that I can set a Access-Control-Allow-Origin header to embed the streams).

I've been running off of that version for about 3 years now, and I guess I'm just going to stick with it until either something better (but repeatable) comes around or I finally have need to upgrade.

I'd be happy to help someone work on a proper, Docker-best-practices image... but I really can't commit to providing long-term maintenance or support of anything.
Lead Developer, Release Engineering Automation & Tooling - Some Company
homepage / blog / github
darmach
Posts: 21
Joined: Thu Aug 13, 2015 8:26 am

Re: Official Docker images

Post by darmach »

@jantman I think there are more users in that boat - the host I am running for such "home infra" works basicall as a docker hypervisor, and I'd love to throw in a zoneminder container to that bunch.

I remember how happy I was (tinkering with zoneminder for quite a few years) about 2 years ago when I found that there are docker images - no longer a manual tinkering, installing on components on baremetal directly! Now I wanted to get back to it, and finally finish my monitoring... and it seem these images are no longer maintaned...
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Official Docker images

Post by Magic919 »

Just use the one mentioned above.
-
Post Reply