@@ -8,26 +8,25 @@ tags: [local, docker]
8
8
9
9
## Getting started
10
10
11
- Pick this template in ` coder templates init ` and follow instructions.
11
+ Run ` coder templates init ` and select this template. Follow the instructions that appear .
12
12
13
13
## Adding/removing images
14
14
15
- After building and pushing an image to an image registry (e.g DockerHub), you can make the
16
- image available to users in the template.
15
+ After building and pushing an image to an image registry (e.g., DockerHub), you can edit the template to make the image available to users.
17
16
18
17
Edit the template:
19
18
20
19
``` sh
21
20
vim main.tf
22
21
```
23
22
variable "docker_image" {
24
- description = "What docker image would you like to use for your workspace?"
23
+ description = "What Docker imagewould you like to use for your workspace?"
25
24
default = "codercom/enterprise-base: ubuntu "
26
25
validation {
27
26
- condition = contains([ "codercom/enterprise-base: ubuntu ", "codercom/enterprise-node: ubuntu ", "codercom/enterprise-intellij: ubuntu "] , var.docker_image)
28
27
+ condition = contains([ "codercom/enterprise-base: ubuntu ", "codercom/enterprise-node: ubuntu ", "codercom/enterprise-intellij: ubuntu ", "codercom/enterprise-golang: ubuntu "] , var.docker_image)
29
28
30
- error_message = "Invalid Docker Image !"
29
+ error_message = "Invalid Docker image !"
31
30
}
32
31
}
33
32
```
@@ -38,16 +37,16 @@ Update the template:
38
37
coder template update docker
39
38
```
40
39
41
- Images can also be removed from the validation list. Workspaces using older template versions will continue using
42
- the removed image until the workspace is updated to the latest version.
40
+ You can also remove images from the validation list. Workspaces using older template versions will continue using
41
+ the removed image until you update the workspace to the latest version.
43
42
44
43
## Updating images
45
44
46
- To reduce drift, we recommend versioning images in your registry via tags. Update the image tag in the template:
45
+ To reduce drift, we recommend versioning images in your registry by creating tags. To update the image tag in the template:
47
46
48
47
``` sh
49
48
variable " docker_image" {
50
- description = " What docker image would you like to use for your workspace?"
49
+ description = " What Docker imagewould you like to use for your workspace?"
51
50
default = " codercom/enterprise-base:ubuntu"
52
51
validation {
53
52
- condition = contains([" my-org/base-development:v1.1" , " myorg-java-development:v1.1" ], var.docker_image)
0 commit comments