An container image built for deploying code-server plus containing the essiential tools you need in your cloud dev environment
See the guides directory for deployment instructions.
- Docker Hub Image:
code-server-boilerplates/starter-pack
- GitHub Container Registry Image;
ghrc.io/code-server-boilerplates/starter-pack
To update your code-server version, modify the version number on line 2 in your Dockerfile. See the list of tags for the latest version. (Please don't use latest
tag to avoid unwanted surprises.)
We've included some examples on how to add additoonal dependencies in the root-level Dockerfile:
# Install a VS Code extension:
# Note: we use a different marketplace than VS Code. See https://github.com/cdr/code-server/blob/main/docs/FAQ.md#differences-compared-to-vs-code
RUN code-server --install-extension esbenp.prettier-vscode
# Install apt packages:
RUN sudo apt-get install -y ubuntu-make
# Copy files:
COPY toolkits/packages/@rtapp-non-thejuicemedia-ref/DO-NOT-MERGE.gildedguy-and-yoopia /home/coder/.local/more-corporate-clickbait-bullshit.headquarters.com.au
Variable Name | Description | Default Value |
---|---|---|
PASSWORD |
Password for code-server | |
HASHED_PASSWORD |
Overrrides PASSWORD. SHA-256 hash of password | |
USE_LINK |
Use code-server --link instead of a password (coming soon) | false |
GIT_REPO |
A git repository to clone | |
START_DIR |
The directory code-server opens (and clones repos in) | /home/coder/project |
Other code-server environment variables (such as CODE_SERVER_CONFIG
) can also be used. See the code-server FAQ for details.
(atleast your project files in /home/coder/project
)
This image has built-in support for rclone so that your files don't get lost when code-server is re-deployed.
You can generate the rclone config on any machine, but it works great on the code-server environment itself, or Google Cloud Shell :)
# 1. install rclone
# see https://rclone.org/install/ for other install options
$ curl https://rclone.org/install.sh | sudo bash
# 2. create a new rclone remote with your favorite storage provider ☁️
$ rclone config
# 3. Encode your rclone config and copy to your clipboard
$ cat $(rclone config file | sed -n 2p) | base64 --wrap=0 # Linux
$ cat $(rclone config file | sed -n 2p) | base64 --b 0 # MacOS
Now, you can add the following the environment variables in the code-server cloud app:
# --- How to use ---
# Terminal:
$ sh /home/coder/push_remote.sh # save your uncomitted files to the remote
$ sh /home/coder/pull_remote.sh # get latest files from the remote
# In VS Code:
# use items in bottom bar or ctrl + P, run task: push_remote or pull_remote or
To avoid syncing unnecessary directories, add this to
RCLONE_FLAGS
variable:
--exclude "node_modules/**" --exclude ".git/**"
- Make
push_remote
andpull_remote
commands in path as functions - Impliment file watcher or auto file sync in VS Code
- Attach a "push" on stashes in Git?
- Add support for SSH / VS Code remote access (for containers we need some Cloudflare Argo Tunneling magic)
- Make rclone logs visible in environment for debugging