I would like to see a persistent solution to this
I think that this is the key point, I have a docker container that is replaced at each update and while I can imagine persisting some files (the ones @linus.nordin mentioned), this will not help if there are some changes that must be done from within the container (i.e. changes that are dynamic and cannot be persisted)