|
1 |
| -# code-server [](https://github.com/cdr/code-server/issues) [](https://github.com/cdr/code-server/releases/latest) [](https://github.com/cdr/code-server/blob/master/LICENSE) [](https://discord.gg/zxSwN8Z) |
| 1 | +# code-server · [](https://github.com/cdr/code-server/blob/master/LICENSE) [](https://github.com/cdr/code-server/releases/latest) [](https://github.com/cdr/code-server) |
2 | 2 |
|
3 |
| -**code-server v2 is almost out!** |
4 |
| -[Get the preview here](https://github.com/cdr/code-server/releases). |
5 |
| -(Linux builds only at the moment.) |
6 |
| - |
7 |
| -`code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a remote server, accessible through the browser. |
| 3 | +`code-server` is [VS Code](https://github.com/Microsoft/vscode) running on a |
| 4 | +remote server, accessible through the browser. |
8 | 5 |
|
9 | 6 | Try it out:
|
10 | 7 | ```bash
|
11 |
| -docker run -it -p 127.0.0.1:8443:8443 -v "${HOME}/.local/share/code-server:/home/coder/.local/share/code-server" -v "${PWD}:/home/coder/project" codercom/code-server --allow-http --no-auth |
| 8 | +docker run -it -p 127.0.0.1:8080:8080 -v "${HOME}/.local/share/code-server:/home/coder/.local/share/code-server" -v "$PWD:/home/coder/project" codercom/code-server |
12 | 9 | ```
|
13 | 10 |
|
14 |
| -- Code on your Chromebook, tablet, and laptop with a consistent dev environment. |
15 |
| - - If you have a Windows or Mac workstation, more easily develop for Linux. |
16 |
| -- Take advantage of large cloud servers to speed up tests, compilations, downloads, and more. |
17 |
| -- Preserve battery life when you're on the go. |
18 |
| - - All intensive computation runs on your server. |
19 |
| - - You're no longer running excess instances of Chrome. |
| 11 | +- **Consistent environment:** Code on your Chromebook, tablet, and laptop with a |
| 12 | + consistent dev environment. develop more easily for Linux if you have a |
| 13 | + Windows or Mac, and pick up where you left off when switching workstations. |
| 14 | +- **Server-powered:** Take advantage of large cloud servers to speed up tests, |
| 15 | + compilations, downloads, and more. Preserve battery life when you're on the go |
| 16 | + since all intensive computation runs on your server. |
20 | 17 |
|
21 |
| - |
| 18 | + |
22 | 19 |
|
23 | 20 | ## Getting Started
|
24 |
| - |
25 |
| -[](https://marketplace.digitalocean.com/apps/code-server?action=deploy) |
26 |
| - |
27 | 21 | ### Run over SSH
|
28 |
| - |
29 | 22 | Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
|
30 | 23 |
|
31 | 24 | ### Docker
|
| 25 | +See the Docker one-liner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile). |
32 | 26 |
|
33 |
| -See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile). |
| 27 | +To debug Golang using the |
| 28 | +[ms-vscode-go extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go), |
| 29 | +you need to add `--security-opt seccomp=unconfined` to your `docker run` |
| 30 | +arguments when launching code-server with Docker. See |
| 31 | +[#725](https://github.com/cdr/code-server/issues/725) for details. |
34 | 32 |
|
35 | 33 | ### Binaries
|
36 |
| - |
37 |
| -1. [Download a binary](https://github.com/cdr/code-server/releases) (Linux and OS X supported. Windows coming soon) |
38 |
| -2. Start the binary with the project directory as the first argument |
39 |
| - |
40 |
| - ``` |
41 |
| - code-server <initial directory to open> |
42 |
| - ``` |
43 |
| - > You will be prompted to enter the password shown in the CLI |
44 |
| - `code-server` should now be running at https://localhost:8443. |
45 |
| -
|
46 |
| - > 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. |
47 |
| -
|
48 |
| -For detailed instructions and troubleshooting, see the [self-hosted quick start guide](doc/self-hosted/index.md). |
49 |
| -
|
50 |
| -Quickstart guides for [Google Cloud](doc/admin/install/google_cloud.md), [AWS](doc/admin/install/aws.md), and [DigitalOcean](doc/admin/install/digitalocean.md). |
51 |
| -
|
52 |
| -How to [secure your setup](/doc/security/ssl.md). |
53 |
| -
|
54 |
| -## Development |
55 |
| -
|
56 |
| -### Known Issues |
57 |
| -
|
| 34 | +1. [Download a binary](https://github.com/cdr/code-server/releases). (Linux and |
| 35 | + OS X supported. Windows coming soon) |
| 36 | +2. Unpack the downloaded file then run the binary. |
| 37 | +3. In your browser navigate to `localhost:8080`. |
| 38 | + |
| 39 | +- For self-hosting and other information see [doc/quickstart.md](doc/quickstart.md). |
| 40 | +- For hosting on cloud platforms see [doc/deploy.md](doc/deploy.md). |
| 41 | + |
| 42 | +### Build |
| 43 | +- If you also plan on developing, set the `OUT` environment variable. Otherwise |
| 44 | + it will build in this directory which will cause issues because `yarn watch` |
| 45 | + will try to compile the build directory as well. |
| 46 | +- For now `@coder/nbin` is a global dependency. |
| 47 | +- Run `yarn build ${vscodeVersion} ${codeServerVersion}` in this directory (for |
| 48 | + example: `yarn build 1.36.0 development`). |
| 49 | +- If you target the same VS Code version our Travis builds do everything will |
| 50 | + work but if you target some other version it might not (we have to do some |
| 51 | + patching to VS Code so different versions aren't always compatible). |
| 52 | +- You can run the built code with `node path/to/build/out/vs/server/main.js` or run |
| 53 | + `yarn binary` with the same arguments in the previous step to package the |
| 54 | + code into a single binary. |
| 55 | + |
| 56 | +## Known Issues |
| 57 | +- Uploading .vsix files doesn't work. |
58 | 58 | - Creating custom VS Code extensions and debugging them doesn't work.
|
59 |
| -- To debug Golang using [ms-vscode-go extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go), you need to add `--security-opt seccomp=unconfined` to your `docker run` arguments when launching code-server with Docker. See [#725](https://github.com/cdr/code-server/issues/725) for details. |
| 59 | +- Extension profiling and tips are currently disabled. |
60 | 60 |
|
61 |
| -### Future |
| 61 | +## Future |
62 | 62 | - **Stay up to date!** Get notified about new releases of code-server.
|
63 | 63 | 
|
64 | 64 | - Windows support.
|
65 | 65 | - Electron and Chrome OS applications to bridge the gap between local<->remote.
|
66 | 66 | - Run VS Code unit tests against our builds to ensure features work as expected.
|
67 | 67 |
|
68 |
| -### Extensions |
69 |
| -
|
70 |
| -At the moment we can't use the official VSCode Marketplace. We've created a custom extension marketplace focused around open-sourced extensions. However, if you have access to the `.vsix` file, you can manually install the extension. |
| 68 | +## Extensions |
| 69 | +At the moment we can't use the official VS Code Marketplace. We've created a |
| 70 | +custom extension marketplace focused around open-sourced extensions. However, |
| 71 | +you can manually download the extension to your extensions directory. It's also |
| 72 | +possible to set your own marketplace URLs by setting the `SERVICE_URL` and |
| 73 | +`ITEM_URL` environment variables. |
71 | 74 |
|
72 | 75 | ## Telemetry
|
73 |
| -
|
74 |
| -Use the `--disable-telemetry` flag or set `DISABLE_TELEMETRY=true` to disable tracking ENTIRELY. |
75 |
| -
|
76 |
| -We use data collected to improve code-server. |
| 76 | +Use the `--disable-telemetry` flag to completely disable telemetry. We use the |
| 77 | +data collected to improve code-server. |
77 | 78 |
|
78 | 79 | ## Contributing
|
| 80 | +### Development |
| 81 | +```shell |
| 82 | +git clone https://github.com/microsoft/vscode |
| 83 | +cd vscode |
| 84 | +git checkout <see travis.yml for the VS Code version to use here> |
| 85 | +git clone https://github.com/cdr/code-server src/vs/server |
| 86 | +cd src/vs/server |
| 87 | +yarn patch:apply |
| 88 | +yarn |
| 89 | +yarn watch |
| 90 | +# Wait for the initial compilation to complete (it will say "Finished compilation"). |
| 91 | +# Run the next command in another shell. |
| 92 | +yarn start |
| 93 | +# Visit http://localhost:8080 |
| 94 | +``` |
79 | 95 |
|
80 |
| -Development guides are coming soon. |
| 96 | +If you run into issues about a different version of Node being used, try running |
| 97 | +`npm rebuild` in the VS Code directory and ignore the error at the end from |
| 98 | +`vscode-ripgrep`. |
| 99 | + |
| 100 | +### Upgrading VS Code |
| 101 | +We patch VS Code to provide and fix some functionality. As the web portion of VS |
| 102 | +Code matures, we'll be able to shrink and maybe even entirely eliminate our |
| 103 | +patch. In the meantime, however, upgrading the VS Code version requires ensuring |
| 104 | +that the patch still applies and has the intended effects. |
| 105 | + |
| 106 | +To generate a new patch, **stage all the changes** you want to be included in |
| 107 | +the patch in the VS Code source, then run `yarn patch:generate` in this |
| 108 | +directory. |
| 109 | + |
| 110 | +Our changes include: |
| 111 | +- Change the remote schema to `code-server`. |
| 112 | +- Allow multiple extension directories (both user and built-in). |
| 113 | +- Modify the loader, websocket, webview, service worker, and asset requests to |
| 114 | + use the URL of the page as a base (and TLS if necessary for the websocket). |
| 115 | +- Send client-side telemetry through the server and get the initial log level |
| 116 | + from the server. |
| 117 | +- Add an upload service for use in editor windows and the explorer along with a |
| 118 | + file prefix to ignore for temporary files created during upload. |
| 119 | +- Make changing the display language work. |
| 120 | +- Make hiding or toggling the menu bar possible. |
| 121 | +- Make it possible for us to load code on the client. |
| 122 | +- Modify the build process to include our code. |
81 | 123 |
|
82 | 124 | ## License
|
83 |
| -
|
84 | 125 | [MIT](LICENSE)
|
85 | 126 |
|
86 | 127 | ## Enterprise
|
87 |
| -
|
88 |
| -Visit [our website](https://coder.com/) for more information about our enterprise offering. |
| 128 | +Visit [our enterprise page](https://coder.com/enterprise) for more information |
| 129 | +about our enterprise offering. |
89 | 130 |
|
90 | 131 | ## Commercialization
|
91 |
| -
|
92 |
| -If you would like to commercialize code-server, please contact [email protected]. |
| 132 | +If you would like to commercialize code-server, please contact |
| 133 | + |
0 commit comments