I'm using docker for some software but I don't get one thing: How does docker handle upgrade of programs?
For example: I have a Deluge container running right now, how I will upgrade my container with Deluge 1.5.13 to Deluge 2.0 while keeping all my settings?
Will docker handle it automatically?
It all depends on how the container was written. The Plex dockers will check for upgrades when restarted if they are configured for that option.
Deluge 2.0? That's still in early beta testing, so I would not be looking for it anytime soon. 1.3.15 is current, but that does not mean that any dockers will be, yours isn't.
What does the documentation for the Deluge docker you are using say about self upgrading?
if you use a persistent path to store your config, update is as easy as delete old docker, donwload new one and configure exactly the last one to use same config path.
Is what I do with pihole docker: pi-hole in docker
this is what say pihole docker in doc. in the section : Upgrading, Persistence, and Customizations
you can do the same automatically using watchtower.