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 2353687 commit 752d609Copy full SHA for 752d609
examples/templates/docker-code-server/main.tf
@@ -47,6 +47,10 @@ resource "coder_app" "code-server" {
47
icon = "/icon/code.svg"
48
}
49
50
+resource "docker_volume" "home_volume" {
51
+ name = "coder-${data.coder_workspace.me.owner}-${data.coder_workspace.me.name}-root"
52
+}
53
+
54
resource "docker_container" "workspace" {
55
count = data.coder_workspace.me.start_count
56
image = "codercom/code-server:latest"
@@ -61,4 +65,9 @@ resource "docker_container" "workspace" {
61
65
host = "host.docker.internal"
62
66
ip = "host-gateway"
63
67
68
+ volumes {
69
+ container_path = "/home/coder/"
70
+ volume_name = docker_volume.home_volume.name
71
+ read_only = false
72
+ }
64
73
0 commit comments