Upgrade path may break with a simple Upgrade of the source image
https://github.com/matrix-org/synapse/blob/master/UPGRADE.rst has known cases of breaking configuration changes when doing a version upgrade.
This should be taken care of in newer iterations.
Note a rebuild happens best with the --no-cache
parameter.