Univention Bugzilla – Bug 50057
Reinitialize Docker App
Last modified: 2019-08-28 15:50:04 CEST
We want to be able to reinitialize a running Docker App: This creates a new container but with the latest App Settings.
This is necessary, if the App cannot apply App Settings during runtime but relies on getting those as environment variables during the container creation.
Essentially this is a "remove" + "install" but with the new settings. In fact, we already have that: "univention-app upgrade" does this when a new image is found. So we use this method here (but with the very same image...)
This way store_data and restore_data is implemented properly. Also copying the correct files (/etc/machine.secret, ...) is already done.
We just need to make sure that we do not use credentials:
* No setup script called
* No App Attributes registered
App Attributes are just skipped - the App was already installed successfully, no need to do it again. The setup script may be mandatory and may rely on credentials: The script refuses to continue in this case.
This is how it works:
Put this into your configure_host script:
if [ "$1" = "settings" ]; then
univention-app reinitialize $myapp
Reinitialization works for multi container apps: OK
Env variables get passed correctly for multi container apps: OK
Reinitialization works for single container apps: OK
Env variables get passed correctly for single container apps: OK
YAML: I did a small typo fix, otherwise OK