mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(examples): add keep_locally to docker_image resources (#16012)
Fixes https://github.com/coder/coder/issues/15972 Adds `keep_locally = true` to other templates that use the `docker_image` resource to prevent the docker provider from attempting to remove the image upon workspace deletion. We had set this in some other places (such as the `dogfood` template) but had not set this consistently in other templates.
This commit is contained in:
@@ -144,6 +144,7 @@ resource "docker_image" "main" {
|
||||
triggers = {
|
||||
dir_sha1 = sha1(join("", [for f in fileset(path.module, "build/*") : filesha1("${path.module}/${f}")]))
|
||||
}
|
||||
keep_locally = true
|
||||
}
|
||||
|
||||
resource "docker_container" "workspace" {
|
||||
|
||||
@@ -92,6 +92,7 @@ resource "docker_image" "main" {
|
||||
triggers = {
|
||||
dir_sha1 = sha1(join("", [for f in fileset(path.module, "build/*") : filesha1(f)]))
|
||||
}
|
||||
keep_locally = true
|
||||
}
|
||||
|
||||
resource "docker_container" "workspace" {
|
||||
|
||||
@@ -155,6 +155,7 @@ data "local_sensitive_file" "cache_repo_dockerconfigjson" {
|
||||
|
||||
resource "docker_image" "devcontainer_builder_image" {
|
||||
name = local.devcontainer_builder_image
|
||||
keep_locally = true
|
||||
}
|
||||
|
||||
resource "docker_volume" "workspaces" {
|
||||
|
||||
Reference in New Issue
Block a user