mirror of
https://github.com/coder/coder.git
synced 2026-10-28 02:42:54 +08:00
chore: update template examples and docs to install code-server under /tmp (#6138)
Updates templates examples and docs to pass the --method standalone argument to code-server install script, and installs code-server under /tmp/code-server. Co-authored-by: Mathias Fredriksson <mafredri@gmail.com> --------- Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
co-authored by
Mathias Fredriksson
parent
4432cd08d6
commit
ab9cba9396
@@ -52,11 +52,12 @@ resource "coder_agent" "main" {
|
||||
#!/bin/sh
|
||||
# install code-server
|
||||
# add '-s -- --version x.x.x' to install a specific code-server version
|
||||
curl -fsSL https://code-server.dev/install.sh | sh
|
||||
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
|
||||
|
||||
# start code-server on a specific port
|
||||
# authn is off since the user already authn-ed into the coder deployment
|
||||
code-server --auth none --port 13337
|
||||
# & is used to run the process in the background
|
||||
/tmp/code-server/bin/code-server --auth none --port 13337 &
|
||||
EOF
|
||||
}
|
||||
```
|
||||
@@ -67,7 +68,9 @@ For advanced use, we recommend installing code-server in your VM snapshot or con
|
||||
FROM codercom/enterprise-base:ubuntu
|
||||
|
||||
# install the latest version
|
||||
USER root
|
||||
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
||||
USER coder
|
||||
|
||||
# pre-install VS Code extensions
|
||||
RUN code-server --install-extension eamodio.gitlens
|
||||
|
||||
Reference in New Issue
Block a user