Coder.comC
Coder.com2y ago
11 replies
Aaron Taylor

Persisting container state across workspace restarts

I am working on setting up development environments with envbuilder, and I would like to emulate the behavior of GitHub Codespaces, where a container is only re-created during a "rebuild" which is distinct from a "restart" in their system. The motivation for this is to persist dotfiles changes that the user may have made.

Is there a way to do this? I've been through https://coder.com/docs/templates/resource-persistence and tried disabling the "count" parameter on the coder_agent terraform resource in the template, but the container is still being re-created.
How resource persistence works in Coder
Resource persistence - Coder Docs
Preview image
Preview image
Was this page helpful?