Skip to content

Commit 76423ec

Browse files
committed
listen on 0.0.0.0, allow for no token set
1 parent eb71c75 commit 76423ec

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This image provides various versions that are available via tags. `latest` tag u
6969

7070
## Application Setup
7171

72-
Access the webui at `http://<your-ip>:3000?tkn=supersecrettoken`. If `CONNECTION_TOKEN` or `CONNECTION_SECRET` env vars are set, replace `supersecrettoken` with the value set. If not, view the container logs (`docker logs openvscode-server`) to see the randomly generated token and replace `supersecrettoken` with that.
72+
If `CONNECTION_TOKEN` or `CONNECTION_SECRET` env vars are set, you can access the webui at `http://<your-ip>:3000/?tkn=supersecrettoken` (replace `supersecrettoken` with the value set). If not, you can access the webui at `http://<your-ip>:3000`.
7373

7474
For github integration, drop your ssh key in to `/config/.ssh`.
7575
Then open a terminal from the top menu and set your github username and email via the following commands
@@ -252,7 +252,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
252252

253253
## Versions
254254

255-
* **04.02.22:** - Update binary for 1.64.0.
255+
* **04.02.22:** - Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset.
256256
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
257257
* **10.12.21:** - Update deprecated connectionToken arg.
258258
* **30.11.21:** - Fix app folder permissions, add the optional sudo password vars.

readme-vars.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ optional_block_1_items: ""
4646
# application setup block
4747
app_setup_block_enabled: true
4848
app_setup_block: |
49-
Access the webui at `http://<your-ip>:3000?tkn=supersecrettoken`. If `CONNECTION_TOKEN` or `CONNECTION_SECRET` env vars are set, replace `supersecrettoken` with the value set. If not, view the container logs (`docker logs openvscode-server`) to see the randomly generated token and replace `supersecrettoken` with that.
49+
If `CONNECTION_TOKEN` or `CONNECTION_SECRET` env vars are set, you can access the webui at `http://<your-ip>:3000/?tkn=supersecrettoken` (replace `supersecrettoken` with the value set). If not, you can access the webui at `http://<your-ip>:3000`.
5050
5151
For github integration, drop your ssh key in to `/config/.ssh`.
5252
Then open a terminal from the top menu and set your github username and email via the following commands
@@ -61,7 +61,7 @@ app_setup_block: |
6161
6262
# changelog
6363
changelogs:
64-
- { date: "04.02.22:", desc: "Update binary for 1.64.0." }
64+
- { date: "04.02.22:", desc: "Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset." }
6565
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
6666
- { date: "10.12.21:", desc: "Update deprecated connectionToken arg." }
6767
- { date: "30.11.21:", desc: "Fix app folder permissions, add the optional sudo password vars." }

root/etc/services.d/openvscode-server/run

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@ elif [ -n "$CONNECTION_TOKEN" ]; then
77
CODE_ARGS="${CODE_ARGS} --connection-token ${CONNECTION_TOKEN}"
88
echo "Using connection token ${CONNECTION_TOKEN}"
99
else
10-
if [ ! -f "/config/.secretkey" ]; then
11-
echo "Generating random secret key. . ."
12-
echo $RANDOM | md5sum | head -c 20 > /config/.secretkey
13-
fi
14-
CODE_ARGS="${CODE_ARGS} --connection-token $(cat /config/.secretkey)"
15-
echo "**** Using connection token $(cat /config/.secretkey) ****"
10+
CODE_ARGS="${CODE_ARGS} --without-connection-token"
11+
echo "**** No connection token is set ****"
1612
fi
1713

1814
cd /app/openvscode-server || exit
1915

2016
exec \
2117
s6-setuidgid abc \
2218
/app/openvscode-server/bin/openvscode-server \
19+
--host 0.0.0.0 \
2320
--port 3000 \
2421
--disable-telemetry \
2522
${CODE_ARGS}

0 commit comments

Comments
 (0)