dlandon / zoneminder.machine.learning

Zoneminder Docker
GNU General Public License v2.0
320 stars 144 forks source link

Reworking the auto-update(-s) at container start... #169

Closed simonmicro closed 3 years ago

simonmicro commented 3 years ago

Hi, I have sort of a problem here... The whole point of docker is providing a known-working version of the software with all its dependencies as one huge file (e.g. the image).

The current implementation of this container performs at start an unskippable, forced (I assume) update of the software... This is not only seriously slowing down the start sequence, kills (breaks, invalidates - whatever you want to call it) any external way of updating the container (e.g. using watchtower) but also violates the aforementioned principle behind using Docker in the first place... Also (in my case) I have a system with a very slow uplink connection, so I uploaded just the image to it using a local link - this was fast and works, but then the update hits and I have to wait a long time until the container can start, as the uplink is really, really slow!

Do not get me wrong: The update is a cool idea, but it should be solved using some sort of CI on the Docker Hubs side and not at start. I propose some way of disabling these updates by e.g. setting and environment variable (should be easy enough) or (even better) skipping them by default.

I'm happy to read your thoughts on this - maybe we can find a (better) solution here... ~ Simon

dlandon commented 3 years ago

This docker is not public at the moment. Are you talking about the previous docker that is no longer supported?

simonmicro commented 3 years ago

I was talking about https://hub.docker.com/r/dlandon/zoneminder - I assumed this would be the right repo for it, as when I click the link at the bottom right I land here... Did you recently renamed this repo?

dlandon commented 3 years ago

That docker is no longer supported and this will eventually replace it.

arisada commented 3 years ago

Hi,

It seems that the issue is still present on the current docker: https://github.com/dlandon/zoneminder.machine.learning/blob/master/init/20_apt_update.sh I can understand that some people like having system packages being updated at docker up time, but I think this is not best practice. An environment variable to enable or disable this behaviour would be perfectly suited to solve this issue. Would you merge a patch implementing this solution?

Regards, Aris

dlandon commented 3 years ago

I do not intend to change this behavior. Because the docker container is potentially exposed to the Internet, it is imperative that security updates are applied. If the user has the option to not do updates, they will never turn it back on for security updates, and it will be my fault when someone gets hacked.

The option is to update the docker container when there are security updates and build a new docker container each time. I do not care to invest time into this effort. I will also be criticized for too many container updates.

If this container doesn't work for you, feel free to find another.