Skip to content

Commit d8ddce8

Browse files
authored
chore: use latest code-server in examples (#14030)
Instead, leave a comment describing how to pin the version. This negates the need to continually update the version in the examples.
1 parent d68340b commit d8ddce8

File tree

13 files changed

+67
-29
lines changed

13 files changed

+67
-29
lines changed

docs/templates/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,12 @@ resource "coder_agent" "coder" {
159159
startup_script = <<EOT
160160
#!/bin/bash
161161
162-
# Install code-server 4.8.3 under /tmp/code-server using the "standalone" installation
163-
# that does not require root permissions. Note that /tmp may be mounted in tmpfs which
164-
# can lead to increased RAM usage. To avoid this, you can pre-install code-server inside
165-
# the Docker image or VM image.
166-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.8.3
162+
# Install the latest code-server under /tmp/code-server using the "standalone"
163+
# installation that does not require root permissions. Note that /tmp may be
164+
# mounted in tmpfs which can lead to increased RAM usage. To avoid this, you can
165+
# pre-install code-server inside the Docker image or VM image.
166+
# Append "--version x.x.x" to install a specific version of code-server.
167+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
167168
168169
# The & prevents the startup_script from blocking so the next commands can run.
169170
# The stdout and stderr of code-server is redirected to /tmp/code-server.log.

docs/templates/tour.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ resource "coder_agent" "main" {
160160
startup_script = <<-EOT
161161
set -e
162162
163-
# install and start code-server
164-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
163+
# Install the latest code-server.
164+
# Append "--version x.x.x" to install a specific version of code-server.
165+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
166+
167+
# Start code-server in the background.
165168
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
166169
EOT
167170

examples/parameters-dynamic-options/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ resource "coder_agent" "main" {
5656
os = "linux"
5757
startup_script = <<EOF
5858
#!/bin/sh
59-
# install and start code-server
60-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3
59+
# Install the latest code-server.
60+
# Append "-s -- --version x.x.x" to install a specific version of code-server.
61+
curl -fsSL https://code-server.dev/install.sh | sh
62+
63+
# Start code-server.
6164
code-server --auth none --port 13337
6265
EOF
6366

examples/parameters/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ resource "coder_agent" "main" {
2929
startup_script = <<-EOT
3030
set -e
3131
32-
# install and start code-server
33-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
32+
# Install the latest code-server.
33+
# Append "--version x.x.x" to install a specific version of code-server.
34+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
35+
36+
# Start code-server in the background.
3437
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
3538
EOT
3639
}

examples/templates/aws-linux/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,11 @@ resource "coder_agent" "dev" {
165165
startup_script = <<-EOT
166166
set -e
167167
168-
# install and start code-server
169-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
168+
# Install the latest code-server.
169+
# Append "--version x.x.x" to install a specific version of code-server.
170+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
171+
172+
# Start code-server in the background.
170173
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
171174
EOT
172175

examples/templates/devcontainer-docker/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,11 @@ resource "coder_agent" "main" {
196196
startup_script = <<-EOT
197197
set -e
198198
199-
# install and start code-server
200-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
199+
# Install the latest code-server.
200+
# Append "--version x.x.x" to install a specific version of code-server.
201+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
202+
203+
# Start code-server in the background.
201204
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
202205
EOT
203206
dir = "/workspaces"

examples/templates/devcontainer-kubernetes/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,11 @@ resource "coder_agent" "main" {
315315
startup_script = <<-EOT
316316
set -e
317317
318-
# install and start code-server
319-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
318+
# Install the latest code-server.
319+
# Append "--version x.x.x" to install a specific version of code-server.
320+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
321+
322+
# Start code-server in the background.
320323
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
321324
EOT
322325
dir = "/workspaces"

examples/templates/docker/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ resource "coder_agent" "main" {
3535
touch ~/.init_done
3636
fi
3737
38-
# install and start code-server
39-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.19.1
38+
# Install the latest code-server.
39+
# Append "--version x.x.x" to install a specific version of code-server.
40+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
41+
42+
# Start code-server in the background.
4043
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
4144
EOT
4245

examples/templates/envbox/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ resource "coder_agent" "main" {
102102
if [ ! -f ~/.bashrc ]; then
103103
cp /etc/skel/.bashrc $HOME
104104
fi
105-
# install and start code-server
106-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.8.3 | tee code-server-install.log
105+
106+
# Install the latest code-server.
107+
# Append "-s -- --version x.x.x" to `sh` to install a specific version of code-server.
108+
curl -fsSL https://code-server.dev/install.sh | sh | tee code-server-install.log
109+
110+
# Start code-server in the background.
107111
code-server --auth none --port 13337 | tee code-server-install.log &
108112
EOT
109113
}

examples/templates/gcp-linux/main.tf

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,11 @@ resource "coder_agent" "main" {
8080
startup_script = <<-EOT
8181
set -e
8282
83-
# install and start code-server
84-
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
83+
# Install the latest code-server.
84+
# Append "--version x.x.x" to install a specific version of code-server.
85+
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server
86+
87+
# Start code-server in the background.
8588
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
8689
EOT
8790

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy