Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN \
git \
jq \
libatomic1 \
libsecret-1-0 \
nano \
net-tools \
sudo && \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN \
git \
jq \
libatomic1 \
libsecret-1-0 \
nano \
net-tools \
sudo && \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN \
git \
jq \
libatomic1 \
libsecret-1-0 \
nano \
net-tools \
sudo && \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This image provides various versions that are available via tags. `latest` tag u

## Application Setup

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.
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`.

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

## Versions

* **04.02.22:** - Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset. Add libsecret for keytar.
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
* **10.12.21:** - Update deprecated connectionToken arg.
* **30.11.21:** - Fix app folder permissions, add the optional sudo password vars.
Expand Down
3 changes: 2 additions & 1 deletion readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ optional_block_1_items: ""
# application setup block
app_setup_block_enabled: true
app_setup_block: |
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.
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`.

For github integration, drop your ssh key in to `/config/.ssh`.
Then open a terminal from the top menu and set your github username and email via the following commands
Expand All @@ -61,6 +61,7 @@ app_setup_block: |

# changelog
changelogs:
- { date: "04.02.22:", desc: "Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset. Add libsecret for keytar." }
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
- { date: "10.12.21:", desc: "Update deprecated connectionToken arg." }
- { date: "30.11.21:", desc: "Fix app folder permissions, add the optional sudo password vars." }
Expand Down
11 changes: 4 additions & 7 deletions root/etc/services.d/openvscode-server/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ elif [ -n "$CONNECTION_TOKEN" ]; then
CODE_ARGS="${CODE_ARGS} --connection-token ${CONNECTION_TOKEN}"
echo "Using connection token ${CONNECTION_TOKEN}"
else
if [ ! -f "/config/.secretkey" ]; then
echo "Generating random secret key. . ."
echo $RANDOM | md5sum | head -c 20 > /config/.secretkey
fi
CODE_ARGS="${CODE_ARGS} --connection-token $(cat /config/.secretkey)"
echo "**** Using connection token $(cat /config/.secretkey) ****"
CODE_ARGS="${CODE_ARGS} --without-connection-token"
echo "**** No connection token is set ****"
fi

cd /app/openvscode-server || exit

exec \
s6-setuidgid abc \
/app/openvscode-server/server.sh \
/app/openvscode-server/bin/openvscode-server \
--host 0.0.0.0 \
--port 3000 \
--disable-telemetry \
${CODE_ARGS}
2 changes: 1 addition & 1 deletion root/usr/local/bin/install-extension
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash

_install=(/app/openvscode-server/server.sh "--extensions-dir" "/config/.vscode-remote/extensions" "--install-extension")
_install=(/app/openvscode-server/bin/openvscode-server "--extensions-dir" "/config/.vscode-remote/extensions" "--install-extension")

if [ "$(whoami)" == "abc" ]; then
"${_install[@]}" "$@"
Expand Down