# 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:** 1

<div class="post-metadata">

**Author:** ![CodeGnome](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codegnome/32/162382_2.png) [@CodeGnome](https://meta.discourse.org/u/CodeGnome)\
**Post date:** [18 december 2019 om 16:21 UTC](https://meta.discourse.org/t/why-is-rebuild-so-tightly-coupled-to-container-run-status/136414/1 "2019-12-18T16:21:53Z")

</div>

In fairness, I should start by saying I’m new to the platform and the codebase, and therefore have no idea how rebuild currently works under the hood. However, my current understanding is that rebuilding:

1. stops the current container
2. constructs a new container with data from the source tree
3. waits for you to start the new container

From a DevOps-oriented perspective, why can’t the new container be built (perhaps in another branch or temporary directory) while the old one is still running? That seems like it would make swapping the new container for the old one a much faster process (at least in terms of downtime), perhaps on the order of seconds rather than minutes.

If the containers are using storage volumes that don’t get destroyed when the container is rebuilt, I’m not even sure that configuration or database changes (e.g. new messages) need to be handled specially in for this use case, meaning that container _building_ shouldn’t be so tightly coupled to container status.

Is this simply an issue that no one has turned their attention to yet, or is there an existing architectural decision that requires one container to be stopped before another can be built?

---

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