Archived
1
0

Revamp README.md with new installation options

This commit is contained in:
Anmol Sethi 2020-05-12 01:46:38 -04:00
parent 8626bed4ef
commit 41d625abb6
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
2 changed files with 75 additions and 27 deletions

View File

@ -1,47 +1,94 @@
# code-server
`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:8080:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest
```
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it through the browser.
- **Code anywhere:** Code on your Chromebook, tablet, and laptop with a
consistent dev environment. Develop on a Linux machine and pick up from any
device with a web browser.
- **Server-powered:** Take advantage of large cloud servers to speed up tests,
compilations, downloads, and more. Preserve battery life when you're on the go
since all intensive computation runs on your server.
- **Server-powered:** Take advantage of large cloud servers to speed up tests, compilations, downloads, and more.
Preserve battery life when you're on the go since all intensive tasks runs on your server.
Make use of a spare computer you have lying around and turn it into a full development environment.
![Example gif](/doc/assets/code-server.gif)
![Example gif](./doc/assets/code-server.gif)
## Getting Started
## Getting started
### Requirements
For a proper setup and walkthrough, please see [./doc/guide.md](./doc/guide.md).
- 64-bit host.
- At least 1GB of RAM.
- 2 cores or more are recommended (1 core works but not optimally).
- Secure connection over HTTPS or localhost (required for service workers and
clipboard support).
- For Linux: GLIBC 2.17 or later and GLIBCXX 3.4.15 or later.
### Debian, Ubuntu
### Run over SSH
```bash
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server_3.3.0_amd64.deb
sudo dpkg -i code-server_3.3.0_amd64.deb
sudo systemctl enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
### Fedora, Red Hat, SUSE
```bash
curl -sSOL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-amd64.rpm
sudo dnf install code-server-3.3.0-amd64.rpm
sudo systemctl enable --now code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
### npm
```bash
npm install -g code-server
code-server
```
### macOS
```bash
brew install code-server
brew service start code-server
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
```
### SSH
You can use [sshcode](https://github.com/codercom/sshcode) to start and use code-server on any Linux machine over SSH.
```bash
sshcode user@dev.coder.com
# Downloads and installs code-server on dev.coder.com and opens it in a new browser window.
```
### Digital Ocean
[![Create a Droplet](./doc/assets/droplet.svg)](https://marketplace.digitalocean.com/apps/code-server)
### Releases
### Docker
1. [Download a release](https://github.com/cdr/code-server/releases). (Linux and macOS supported. Windows support planned.)
2. Unpack the downloaded release then run the included `code-server` script.
3. In your browser navigate to `localhost:8080`.
```bash
docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest
```
This will start a code-server container and expose it at http://127.0.0.1:8080. It will also mount
your current directory into the container as `/home/coder/project` and forward your UID/GID so that
all file system operations occur as your user outside the container.
### Self contained releases
We publish self contained archives for every release on [github](https://github.com/cdr/code-server/releases).
They bundle the node binary and node_modules.
1. Download the latest release archive for your system from [github](https://github.com/cdr/code-server/releases)
2. Unpack the release
3. You can run code-server by executing `bin/code-server`
Add the code-server `bin` directory to your `$PATH` to easily execute it without the full path every time.
Here is an example script for installing and using a self-contained code-server release on Linux:
```bash
curl -sSL https://github.com/cdr/code-server/releases/download/3.3.0/code-server-3.3.0-linux-amd64.tar.gz | sudo tar -C /opt -xz
PATH="$PATH:/opt/code-server-3.3.0-linux-amd64/bin"
code-server
```
## FAQ

View File

@ -52,7 +52,8 @@ release_nfpm() {
local nfpm_config
nfpm_config=$(envsubst < ./ci/build/nfpm.yaml)
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.deb"
# The underscores are convention for .deb.
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server_"$VERSION_$ARCH.deb"
nfpm pkg -f <(echo "$nfpm_config") --target release-packages/code-server-"$VERSION-$ARCH.rpm"
}