From e5776cb698c29422b1f62485e90bca3c651eb789 Mon Sep 17 00:00:00 2001 From: Dennis Schwerdel Date: Tue, 20 Apr 2021 00:16:17 +0200 Subject: [PATCH] Update --- CloudronManifest.json | 26 +++++++++++++++++++------- DESCRIPTION.md | 17 +++++++++++++++-- Dockerfile | 4 +++- POSTINSTALL.md | 9 +++++---- start.sh | 2 +- 5 files changed, 43 insertions(+), 15 deletions(-) diff --git a/CloudronManifest.json b/CloudronManifest.json index cba9f12..2d836db 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -4,8 +4,7 @@ "author": "Dennis Schwerdel", "description": "file://DESCRIPTION.md", "tagline": "Visual Studio Code in the browser", - "tags": [ - ], + "tags": [], "version": "0.1.0", "healthCheckPath": "/healthz", "httpPort": 8080, @@ -18,11 +17,24 @@ "localstorage": {}, "proxyAuth": { "path": "!/healthz" } }, - "capabilities": [ - ], - "minBoxVersion": "1.8.1", - "tcpPorts": {}, - "udpPorts": {}, + "capabilities": [], + "minBoxVersion": "6.0.0", + "tcpPorts": { + "TCP_DEV_PORT": { + "title": "Development Port", + "description": "TCP Port over which you can reach apps you develop (internal port: 5000)", + "defaultValue": 5000, + "containerPort": 5000 + } + }, + "udpPorts": { + "UDP_DEV_PORT": { + "title": "Development Port", + "description": "UDP Port over which you can reach apps you develop (internal port: 5000)", + "defaultValue": 5000, + "containerPort": 5000 + } + }, "mediaLinks": [ "https://git.ddswd.de/cloudron/vscode-app/raw/branch/master/medialinks/screenshot.jpg" ], diff --git a/DESCRIPTION.md b/DESCRIPTION.md index 035aead..2dd5fda 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -1,4 +1,4 @@ -### VS Code +## VS Code Run VS Code on any machine anywhere and access it in the browser. @@ -12,9 +12,13 @@ The app comes with very little adaptations to code-server: * Generate a randomized password on first start (similar to code-server) * Print passwort to logs on each start * Use original VS code icon as favicon +* Optional Cloudron SSO integration +* Enable sudo +* TCP/UDP Development Port +* Script to run chroot'ed Alpine Linux -## Changing the password +### Changing the password (only for custom auth) The password is configured in `/app/data/vscode/config/config.yaml`. You can change it by modifying the `password` key. @@ -23,3 +27,12 @@ Also you can set the `hashed-password` key (create it) to the SHA-256 checksum of a password (This setting takes precedence over `password`). After changing the password (either way), the app has to be restarted. + + +### Installing additional software + +There are two ways to install required additional software: + +1. You can install software into the home folder of the current user. This works for a lot of tools like NodeJS or Rust. + +2. You can download an image of a full OS (e.g. Alpine Linux) and work inside it using chroot. See `chroot-alpine`. diff --git a/Dockerfile b/Dockerfile index 6f861d2..a59dfac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,5 +19,7 @@ ADD start.sh /app/code/start.sh ADD favicon /app/code/favicon RUN cp /app/code/favicon/* /usr/lib/code-server/src/browser/media/ -CMD [ "/app/code/start.sh" ] +RUN usermod -aG sudo cloudron +Add chroot-alpine /usr/local/bin/chroot-alpine +CMD [ "/app/code/start.sh" ] diff --git a/POSTINSTALL.md b/POSTINSTALL.md index ec512b1..7326488 100644 --- a/POSTINSTALL.md +++ b/POSTINSTALL.md @@ -1,12 +1,13 @@ # App authentication -This app uses a custom password and does not integrate with Cloudron authentication -as it only provides one environment to all users who know the password. - +This app integrates with Cloudron SSO by default. +If you choose to opt out of SSO, a custom password is used. The initial password is randomly generated and printed to the logs when the app starts. +Please note that the app provides the same environment to all users. -## Changing the password + +## Changing the password (only for custom auth) The password is configured in `/app/data/vscode/config/config.yaml`. You can change it by modifying the `password` key. diff --git a/start.sh b/start.sh index 476dd1b..f9b8916 100755 --- a/start.sh +++ b/start.sh @@ -23,7 +23,7 @@ if ! [ -f /app/data/vscode/config/config.yaml ]; then echo "Generated random password: ${PASSWORD}" fi -if [ "${CLOUDRON_PROXY_AUTH:=0}" == "1" ]; then +if [ "${CLOUDRON_PROXY_AUTH:-0}" == "1" ]; then sed -i "s/^auth:.*/auth: none/g" /app/data/vscode/config/config.yaml else sed -i "s/^auth:.*/auth: password/g" /app/data/vscode/config/config.yaml