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/