The attached patch stores build information in a new deploy/config directory, which can be saved with a generated image to help with potential reconstruction of that image at a later point in time.
There's probably some more information that could be stored - suggestions welcome.
THanks, Ward.