# Why is "rebuild" so tightly coupled to container run status?

**URL:** <https://meta.discourse.org/t/why-is-rebuild-so-tightly-coupled-to-container-run-status/136414>\
**Category:** Development\
**Created:** [18 december 2019 om 16:21 UTC](https://meta.discourse.org/t/why-is-rebuild-so-tightly-coupled-to-container-run-status/136414 "2019-12-18T16:21:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ChrisBeach](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chrisbeach/32/214628_2.png) [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**Post date:** [19 december 2019 om 13:46 UTC](https://meta.discourse.org/t/why-is-rebuild-so-tightly-coupled-to-container-run-status/136414/3 "2019-12-19T13:46:11Z")

</div>

I may be wrong, but I feel @CodeGnome’s question about zero-downtime rebuilds still merits further investigation.

If I understand Docker correctly, the following aspects of Discourse could be rebuilt in the background in a new container while the existing container is still running:

- Update Discourse source
- Update OS level dependencies, like Ruby major verson
- Update the Docker image. Just as an example, earlier this year we changed from Ubuntu 16.04 to last Debian and all is transparent to the user, just type `./launcher rebuild app` .

Regarding breaking PostgreSQL changes, that’s more fiddly due to the volume, which, I assume, is shared between the old and new containers.

Perhaps the site could be put in read-only mode at the start of the rebuild, with the old container keeping its existing volume, and the newly-building database could operate within a new Docker volume?

---

_[View the full topic](https://meta.discourse.org/t/why-is-rebuild-so-tightly-coupled-to-container-run-status/136414)._
