From f99051341c4106bb46eef51bcba730dd615f05ac Mon Sep 17 00:00:00 2001 From: aptalca Date: Thu, 5 Mar 2020 16:15:55 -0500 Subject: [PATCH] structural changes for v3.0.0 --- Dockerfile | 11 +++++++---- README.md | 1 + readme-vars.yml | 1 + root/etc/services.d/code-server/run | 10 ++++++---- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index da0b19b..7c20b88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ LABEL maintainer="aptalca" ENV HOME="/config" RUN \ + echo "**** install dependencies ****" && \ apt-get update && \ apt-get install -y \ git \ @@ -23,12 +24,14 @@ RUN \ CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases" \ | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name'); \ fi && \ + CODE_URL=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/tags/${CODE_RELEASE}" \ + | jq -r '.assets[] | select(.browser_download_url | contains("linux-x86_64")) | .browser_download_url') && \ + mkdir -p /app/code-server && \ curl -o \ - /tmp/code.tar.gz -L \ - "https://github.com/cdr/code-server/releases/download/${CODE_RELEASE}/code-server${CODE_RELEASE}-linux-x86_64.tar.gz" && \ + /tmp/code.tar.gz -L \ + "${CODE_URL}" && \ tar xzf /tmp/code.tar.gz -C \ - /usr/bin/ --strip-components=1 \ - --wildcards code-server*/code-server && \ + /app/code-server --strip-components=1 && \ echo "**** clean up ****" && \ rm -rf \ /tmp/* \ diff --git a/README.md b/README.md index 2bb78a6..1b73c1a 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **05.03.20:** - Updates for v3.0.0 (structural changes). * **09.07.19:** - Add optional sudo access. * **01.07.19:** - Add nano. * **24.06.19:** - Initial Release. diff --git a/readme-vars.yml b/readme-vars.yml index 6733467..c88912a 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -65,6 +65,7 @@ app_setup_block: | # changelog changelogs: + - { date: "05.03.20:", desc: "Updates for v3.0.0 (structural changes)." } - { date: "09.07.19:", desc: "Add optional sudo access." } - { date: "01.07.19:", desc: "Add nano." } - { date: "24.06.19:", desc: "Initial Release." } diff --git a/root/etc/services.d/code-server/run b/root/etc/services.d/code-server/run index 3703dbb..b11525b 100644 --- a/root/etc/services.d/code-server/run +++ b/root/etc/services.d/code-server/run @@ -1,18 +1,20 @@ #!/usr/bin/with-contenv bash if [ -n "${PASSWORD}" ]; then - AUTH="--auth password" + AUTH="password" else - echo "starting with no password" + AUTH="none" + echo "starting with no password" fi exec \ s6-setuidgid abc \ - /usr/bin/code-server \ + /app/code-server/code-server \ + --host 0.0.0.0 \ --port 8443 \ --user-data-dir /config/data \ --extensions-dir /config/extensions \ --disable-telemetry \ --disable-updates \ - ${AUTH} \ + --auth ${AUTH} \ /config/workspace