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: 1988
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 :-)
pinchuk
Posts: 1
Joined: Sun Jun 12, 2022 9:59 am

Re: Official Docker images

Post by pinchuk »

jakob.tewes - are there any results with your tests?
jantman
Posts: 10
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: 1988
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: 10
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: 1988
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
Post Reply