I made an experimental docker upgrade docker, but I’m not sure whether it will really scale and work, but decided to share it, maybe others see some caveats? Or ways to make it better and scale and be configurable.
I run my environment via docker-compose, to upgrade I shutdown my production docker, mount my userdata folder in a dedicate update docker and update from that one. Than its time to recycle my main docker. And voila it (seems to) work
Custom update docker:
FROM openhab/openhab:2.2.0-snapshot-amd64-debian RUN apt-get update && \ apt-get install --no-install-recommends -y \ curl && \ rm -rf /var/lib/apt/lists/* CMD ["gosu", "openhab", "/bin/bash"]
cd upgrade_docker docker build -t openhab:2.2.0-update . && \ docker run -it --rm \ -v /meru/docker-configs/openhab/userdata2:/openhab/userdata \ openhab:2.2.0-update /bin/bash /openhab/runtime/bin/update 2.2.0-SNAPSHOT
Finally pull the new docker image recycle the docker compose container:
docker pull openhab/openhab:2.2.0-snapshot-amd64-debian docker-compose down && docker-compose up -d
It seems to work but it has some fixed paths and other rough edges.
Please be carefull not to ruin your production enviroment with it but testing is appreciated