lichess-org/fishnet

Docker and --auto-update

haamis opened this issue · 4 comments

Does fishnet update itself when run in the docker container?

I looked at the docker entrypoint and didn't see --auto-update there nor did I see a way to pass arguments to it.
Is the assumption that people will handle pulling a new version of the container when on comes out?

@teotwaki recommended this here: #133 (comment).

The images on Dockerhub are automatically tagged in semver fashion. For example 2 is currently an alias for 2.2. 2.2 is an alias for 2.2.6.

I am not opposed to making --auto-update optionally available via https://github.com/niklasf/fishnet/blob/master/docker-entrypoint.sh.

It's usually poor practice for Docker images to update themselves. The main reasoning is due to the following scenario:

  • binary foo (in docker) uses file format 2
  • binary foo updates itself, and upgrades to file format 3
  • host machine restarts, and docker instance gets reset, binary foo now only understands file format 2, crashes because local data is in file format 3.

The "proper" way to handle this in Docker world is to use something like watchtower: https://www.ctl.io/developers/blog/post/watchtower-automatic-updates-for-docker-containers/

Thanks for explaining. Ok, so let's not do it for now (even optionally), since we may want to persist data in the future (#156).

I agree that what @teotwaki is saying is the proper of doing this, especially if you're running a more complex system. However as fishnet doesn't even save any files (afaik), I might just edit my entrypoint and add --auto-update.

Thanks for the quick reply.