Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69b7eed commit 804115eCopy full SHA for 804115e
examples/templates/docker-code-server/main.tf
@@ -28,6 +28,10 @@ resource "coder_app" "code-server" {
28
url = "http://localhost:8080/?folder=/home/coder"
29
}
30
31
+resource "docker_volume" "home_volume" {
32
+ name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}-root"
33
+}
34
+
35
resource "docker_container" "workspace" {
36
count = data.coder_workspace.me.start_count
37
image = "codercom/code-server:latest"
@@ -42,4 +46,9 @@ resource "docker_container" "workspace" {
42
46
host = "host.docker.internal"
43
47
ip = "host-gateway"
44
48
49
+ volumes {
50
+ container_path = "/home/coder/"
51
+ volume_name = docker_volume.home_volume.name
52
+ read_only = false
53
+ }
45
54
0 commit comments