I’d suggest looking into how GitHub - discourse/docker_manager: Plugin for use with discourse docker image · GitHub works. It compares the running version to GitHub, and updates with close to no downtime. Perhaps you can automate that instead of doing a full rebuild each time?