Skip to content

Basic 'Building from source' instructions #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
`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.
- 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.
- All intensive computation runs on your server.
- You're no longer running excess instances of Chrome.

![Screenshot](/doc/assets/ide.png)

Expand All @@ -35,10 +36,11 @@ See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile)
```
code-server <initial directory to open>
```
> 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).

Expand All @@ -53,6 +55,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.
Expand All @@ -65,7 +68,35 @@ 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 for a different platform.

We recommend you build the docker image as this is less error prone and easier than building natively.

To build a docker image clone 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 the code-server repository and run

```shell
node --version # make sure you have v10.15.1
npm install -g [email protected]
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 (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+, go to and enable <chrome://flags/#allow-insecure-localhost> and go to and enable <chrome://flags/#unsafely-treat-insecure-origin-as-secure> and enter `localhost:8443` in its textbox.

## License

Expand Down