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