From 26d247183012bdb06360bc6d99a1b5486a0fa075 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 18 Apr 2019 01:18:28 +0200 Subject: [PATCH 1/5] Added documentation for building from source --- README.md | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 547c336c1ca7..0dfb035807ca 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,14 @@ `code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a remote server, accessible through the browser. Try it out: + ```bash docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server:1.621 --allow-http --no-auth ``` -- Code on your Chromebook, tablet, and laptop with a consistent dev environment. - - If you have a Windows or Mac workstation, more easily develop for Linux. +- Code on your Chromebook, tablet, and laptop with a consistent dev environment. - If you have a Windows or Mac workstation, more easily develop for Linux. - Take advantage of large cloud servers to speed up tests, compilations, downloads, and more. -- Preserve battery life when you're on the go. - - All intensive computation runs on your server. - - You're no longer running excess instances of Chrome. +- Preserve battery life when you're on the go. - All intensive computation runs on your server. - You're no longer running excess instances of Chrome. ![Screenshot](/doc/assets/ide.png) @@ -35,10 +33,11 @@ See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile) ``` code-server ``` - > You will be prompted to enter the password shown in the CLI - `code-server` should now be running at https://localhost:8443. - > code-server uses a self-signed SSL certificate that may prompt your browser to ask you some additional questions before you proceed. Please [read here](doc/self-hosted/index.md) for more information. + > You will be prompted to enter the password shown in the CLI + > `code-server` should now be running at https://localhost:8443. + + > code-server uses a self-signed SSL certificate that may prompt your browser to ask you some additional questions before you proceed. Please [read here](doc/self-hosted/index.md) for more information. For detailed instructions and troubleshooting, see the [self-hosted quick start guide](doc/self-hosted/index.md). @@ -53,6 +52,7 @@ How to [secure your setup](/doc/security/ssl.md). - Creating custom VS Code extensions and debugging them doesn't work. ### Future + - **Stay up to date!** Get notified about new releases of code-server. ![Screenshot](/doc/assets/release.gif) - Windows support. @@ -65,7 +65,34 @@ At the moment we can't use the official VSCode Marketplace. We've created a cust ## Contributing -Development guides are coming soon. +### Building from source + +There are two ways to build `code-server` from source. You can either build the Docker image using `docker` or build natively for your platform you can not cross-build. + +We recommend you build the docker image as this is not as error prone as building natively. + +To build docker navigate to the code-server repository and run + +```shell +docker build -t codercom/code-server:development . +# to build the image, then run +docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server:development --allow-http --no-auth +# to start the development server. to shut it down press CTRL + C (or CMD + C on macOS) +``` + +To build natively clone to the code-server repository and run + +```shell +node --version # tested with v10.15.1 +npm install -g yarn@1.13 +yarn +yarn task build:server:binary # depending on your system this can take up to 15 minutes +# your binary can be found in packages/server and is in the format cli-OS-ARCH (cli-linux-x64) +``` + +> Building natively only works on macOS and Linux (Ubuntu 18.04 is validated to work). Windows is currently not supported #259 + +If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building, use Chrome 72+, enable chrome://flags/#allow-insecure-localhost and enable chrome://flags/#unsafely-treat-insecure-origin-as-secure and enter localhost:8443 in the textbox. ## License From e8419264d35ae183c172711e797b2892e8dcb2a4 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 18 Apr 2019 01:23:09 +0200 Subject: [PATCH 2/5] changed some text in readme --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0dfb035807ca..1c56962d0d4c 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,11 @@ At the moment we can't use the official VSCode Marketplace. We've created a cust ### Building from source -There are two ways to build `code-server` from source. You can either build the Docker image using `docker` or build natively for your platform you can not cross-build. +There are two ways to build `code-server` from source. You can either build the Docker image using `docker` or build natively for your platform. You can not cross-build for a different platform. -We recommend you build the docker image as this is not as error prone as building natively. +We recommend you build the docker image as this is less error prone and easier than building natively. -To build docker navigate to the code-server repository and run +To build a docker image clone the code-server repository and run ```shell docker build -t codercom/code-server:development . @@ -80,19 +80,20 @@ docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/c # to start the development server. to shut it down press CTRL + C (or CMD + C on macOS) ``` -To build natively clone to the code-server repository and run +To build natively clone the code-server repository and run ```shell -node --version # tested with v10.15.1 +node --version # make sure you have v10.15.1 npm install -g yarn@1.13 yarn yarn task build:server:binary # depending on your system this can take up to 15 minutes -# your binary can be found in packages/server and is in the format cli-OS-ARCH (cli-linux-x64) ``` -> Building natively only works on macOS and Linux (Ubuntu 18.04 is validated to work). Windows is currently not supported #259 +your binary can be found in packages/server and is in the format cli-OS-ARCH (cli-linux-x64) -If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building, use Chrome 72+, enable chrome://flags/#allow-insecure-localhost and enable chrome://flags/#unsafely-treat-insecure-origin-as-secure and enter localhost:8443 in the textbox. +> Building natively only works on macOS and Linux (Ubuntu 18.04 is validated to work). Windows is currently not supported (see issue #259). + +If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building. Use Chrome 72+, enable [allow-insecure-localhost](chrome://flags/#allow-insecure-localhost) and enable [unsafely-treat-insecure-origin-as-secure](chrome://flags/#unsafely-treat-insecure-origin-as-secure) and enter `localhost:8443` in its textbox. ## License From 89e1ce78634b664bd7fafe0984422a4126fc9d8a Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 18 Apr 2019 01:24:31 +0200 Subject: [PATCH 3/5] fixed links? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c56962d0d4c..862caf453c75 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ your binary can be found in packages/server and is in the format cli-OS-ARCH (cl > Building natively only works on macOS and Linux (Ubuntu 18.04 is validated to work). Windows is currently not supported (see issue #259). -If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building. Use Chrome 72+, enable [allow-insecure-localhost](chrome://flags/#allow-insecure-localhost) and enable [unsafely-treat-insecure-origin-as-secure](chrome://flags/#unsafely-treat-insecure-origin-as-secure) and enter `localhost:8443` in its textbox. +If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building. Use Chrome 72+, enable and enable and enter `localhost:8443` in its textbox. ## License From d85b2ea2c63fd7875a9d9952e1bf0e8b646fa192 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 18 Apr 2019 01:25:36 +0200 Subject: [PATCH 4/5] changed instructions for sw --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 862caf453c75..0af7cbf82075 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ your binary can be found in packages/server and is in the format cli-OS-ARCH (cl > Building natively only works on macOS and Linux (Ubuntu 18.04 is validated to work). Windows is currently not supported (see issue #259). -If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building. Use Chrome 72+, enable and enable and enter `localhost:8443` in its textbox. +If you want to test with the service-worker and PWA enabled during development, please run `export NODE_ENV=production` before building. Use Chrome 72+, go to and enable and go to and enable and enter `localhost:8443` in its textbox. ## License From 8fecfbc2f152105221a9b2810dc468051f0399a1 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Thu, 18 Apr 2019 01:27:39 +0200 Subject: [PATCH 5/5] fixed indentation --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0af7cbf82075..8b5a72083504 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,12 @@ Try it out: docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server:1.621 --allow-http --no-auth ``` -- Code on your Chromebook, tablet, and laptop with a consistent dev environment. - If you have a Windows or Mac workstation, more easily develop for Linux. +- Code on your Chromebook, tablet, and laptop with a consistent dev environment. + - If you have a Windows or Mac workstation, more easily develop for Linux. - Take advantage of large cloud servers to speed up tests, compilations, downloads, and more. -- Preserve battery life when you're on the go. - All intensive computation runs on your server. - You're no longer running excess instances of Chrome. +- Preserve battery life when you're on the go. + - All intensive computation runs on your server. + - You're no longer running excess instances of Chrome. ![Screenshot](/doc/assets/ide.png)