You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ides.md
+54-9
Original file line number
Diff line number
Diff line change
@@ -57,20 +57,65 @@ Code, connected to your Coder workspace for compute, etc.
57
57
1. In VS Code's left-hand nav bar, click **Remote Explorer** and right-click on
58
58
a workspace to connect.
59
59
60
-
## VS Code in the browser
60
+
## VS Code in the browser (code-server)
61
61
62
-
> You must have Docker Desktop running for this template to work.
62
+
There a few ways to add `code-server` to a workspace. You can install it in the Dockerfile and subsequent container image or VM image, or install it dynamically as part of coder_agent resource in a template.
You start `code-server` in the `coder_agent` resource of a template, and add a `coder_app` resource to define the icon and url for code-server to appear in the workspace web UI.
66
65
67
-
To use:
66
+
<palign="center">
67
+
<imgsrc="./images/code-server-in-ui.png">
68
+
</p>
68
69
69
-
1. Start Coder:
70
+
Here is an example of installing `code-server` in a Dockerfile
70
71
71
-
```console
72
-
coder server --dev
73
-
```
72
+
```console
73
+
FROM codercom/enterprise-base:ubuntu
74
+
75
+
USER root
76
+
77
+
# Install code-server
78
+
RUN curl -fsSL https://code-server.dev/install.sh | sh
79
+
80
+
USER coder
81
+
```
82
+
83
+
Here is an example of installing `code-server` in the `coder_agent` resource of a template's `main.tf` and defining the `coder-app` resource. If you install `code-server` in the image, you can eliminate the install step below.
84
+
85
+
```console
86
+
resource "coder_agent" "coder" {
87
+
os = "linux"
88
+
arch = "amd64"
89
+
startup_script = <<EOT
90
+
#!/bin/bash
91
+
92
+
# install code-server
93
+
curl -fsSL https://code-server.dev/install.sh | sh
0 commit comments