From eb71c7540f04cacf7e96bd2026c5c511e42ea496 Mon Sep 17 00:00:00 2001 From: aptalca Date: Fri, 4 Feb 2022 13:20:48 -0500 Subject: [PATCH 1/3] update binary for 1.64.0+ --- README.md | 1 + readme-vars.yml | 1 + root/etc/services.d/openvscode-server/run | 2 +- root/usr/local/bin/install-extension | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 459f88d..9041e0b 100644 --- a/README.md +++ b/README.md @@ -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. * **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. diff --git a/readme-vars.yml b/readme-vars.yml index fdcdf7d..13a0d80 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -61,6 +61,7 @@ app_setup_block: | # changelog changelogs: + - { date: "04.02.22:", desc: "Update binary for 1.64.0." } - { 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." } diff --git a/root/etc/services.d/openvscode-server/run b/root/etc/services.d/openvscode-server/run index 0d4876d..2d6d3a8 100644 --- a/root/etc/services.d/openvscode-server/run +++ b/root/etc/services.d/openvscode-server/run @@ -19,7 +19,7 @@ cd /app/openvscode-server || exit exec \ s6-setuidgid abc \ - /app/openvscode-server/server.sh \ + /app/openvscode-server/bin/openvscode-server \ --port 3000 \ --disable-telemetry \ ${CODE_ARGS} diff --git a/root/usr/local/bin/install-extension b/root/usr/local/bin/install-extension index 60115c3..c5fbc60 100755 --- a/root/usr/local/bin/install-extension +++ b/root/usr/local/bin/install-extension @@ -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[@]}" "$@" From 76423ec655390ff19a3cbdcf43f7d13262fcb1cc Mon Sep 17 00:00:00 2001 From: aptalca Date: Fri, 4 Feb 2022 14:37:22 -0500 Subject: [PATCH 2/3] listen on 0.0.0.0, allow for no token set --- README.md | 4 ++-- readme-vars.yml | 4 ++-- root/etc/services.d/openvscode-server/run | 9 +++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9041e0b..4b4c5f8 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ This image provides various versions that are available via tags. `latest` tag u ## Application Setup -Access the webui at `http://: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://:3000/?tkn=supersecrettoken` (replace `supersecrettoken` with the value set). If not, you can access the webui at `http://: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 @@ -252,7 +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. +* **04.02.22:** - Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset. * **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. diff --git a/readme-vars.yml b/readme-vars.yml index 13a0d80..22cca5c 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -46,7 +46,7 @@ optional_block_1_items: "" # application setup block app_setup_block_enabled: true app_setup_block: | - Access the webui at `http://: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://:3000/?tkn=supersecrettoken` (replace `supersecrettoken` with the value set). If not, you can access the webui at `http://: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 @@ -61,7 +61,7 @@ app_setup_block: | # changelog changelogs: - - { date: "04.02.22:", desc: "Update binary for 1.64.0." } + - { date: "04.02.22:", desc: "Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset." } - { 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." } diff --git a/root/etc/services.d/openvscode-server/run b/root/etc/services.d/openvscode-server/run index 2d6d3a8..7ccbe3b 100644 --- a/root/etc/services.d/openvscode-server/run +++ b/root/etc/services.d/openvscode-server/run @@ -7,12 +7,8 @@ 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 @@ -20,6 +16,7 @@ cd /app/openvscode-server || exit exec \ s6-setuidgid abc \ /app/openvscode-server/bin/openvscode-server \ + --host 0.0.0.0 \ --port 3000 \ --disable-telemetry \ ${CODE_ARGS} From 48d5d32a3648b15fdab0243a9079d9b8d493c48c Mon Sep 17 00:00:00 2001 From: aptalca Date: Fri, 4 Feb 2022 14:59:22 -0500 Subject: [PATCH 3/3] add libsecret for keytar --- Dockerfile | 1 + Dockerfile.aarch64 | 1 + Dockerfile.armhf | 1 + README.md | 2 +- readme-vars.yml | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e91927..ad802dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN \ git \ jq \ libatomic1 \ + libsecret-1-0 \ nano \ net-tools \ sudo && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2003e69..1a20cbc 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -17,6 +17,7 @@ RUN \ git \ jq \ libatomic1 \ + libsecret-1-0 \ nano \ net-tools \ sudo && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 2807e33..e79d863 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -17,6 +17,7 @@ RUN \ git \ jq \ libatomic1 \ + libsecret-1-0 \ nano \ net-tools \ sudo && \ diff --git a/README.md b/README.md index 4b4c5f8..3fc374e 100644 --- a/README.md +++ b/README.md @@ -252,7 +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. +* **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. diff --git a/readme-vars.yml b/readme-vars.yml index 22cca5c..611da5e 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -61,7 +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." } + - { 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." }