Skip to content

Commit d3eb896

Browse files
authored
fix: remove built-in image for Docker template (#15504)
The hardcoded image is an anti-pattern, leading to weird errors if the `docker` group is absent. We should either provide a better error in-product or just have a better image. @matifali - also down to use a Devcontainers universal image instead or make this a parameter. Let me know what you think the best "default install" is
1 parent bebc38e commit d3eb896

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

examples/templates/docker/build/Dockerfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/templates/docker/main.tf

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -169,22 +169,9 @@ resource "docker_volume" "home_volume" {
169169
}
170170
}
171171

172-
resource "docker_image" "main" {
173-
name = "coder-${data.coder_workspace.me.id}"
174-
build {
175-
context = "./build"
176-
build_args = {
177-
USER = local.username
178-
}
179-
}
180-
triggers = {
181-
dir_sha1 = sha1(join("", [for f in fileset(path.module, "build/*") : filesha1(f)]))
182-
}
183-
}
184-
185172
resource "docker_container" "workspace" {
186173
count = data.coder_workspace.me.start_count
187-
image = docker_image.main.name
174+
image = "codercom/enterprise-base:ubuntu"
188175
# Uses lower() to avoid Docker restriction on container names.
189176
name = "coder-${data.coder_workspace_owner.me.name}-${lower(data.coder_workspace.me.name)}"
190177
# Hostname makes the shell more user friendly: coder@my-workspace:~$

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy