File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,28 @@ resource "docker_container" "workspace" {
162162}
163163```
164164
165+ #### Using updated images when rebuilding a workspace
166+
167+ To ensure that Coder uses an updated image when rebuilding a workspace, we
168+ suggest that admins update the tag in the template (e.g., ` my-image:v0.4.2 ` ->
169+ ` my-image:v0.4.3 ` ) or digest (` my-image@sha256:[digest] ` ->
170+ ` my-image@sha256:[new_digest] ` ).
171+
172+ Alternatively, if you're willing to wait for longer start times from Coder, you
173+ can set the ` imagePullPolicy ` to ` Always ` in your Terraform template; when set,
174+ Coder will check ` image:tag ` on every build and update if necessary:
175+
176+ ``` tf
177+ resource "kubernetes_pod" "podName" {
178+ spec {
179+ container {
180+ image_pull_policy = "Always"
181+ }
182+ }
183+ }
184+ ```
185+
186+
165187#### Delete workspaces
166188
167189When a workspace is deleted, the Coder server essentially runs a
@@ -172,7 +194,7 @@ resources associated with the workspace.
172194> [ prevent-destroy] ( https://www.terraform.io/language/meta-arguments/lifecycle#prevent_destroy )
173195> and
174196> [ ignore-changes] ( https://www.terraform.io/language/meta-arguments/lifecycle#ignore_changes )
175- > meta-arguments can be used to accidental data loss.
197+ > meta-arguments can be used to accidental data loss.
176198
177199### Coder apps
178200
You can’t perform that action at this time.
0 commit comments