Skip to content

Containers: Add VS Code tasks and improve overall documentation & flexibility #12

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

Merged
merged 18 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add better docs for dev tools
  • Loading branch information
bpmct committed Mar 15, 2021
commit 1c703a450855fd15430b6ea282c7ef06f77ebd7c
15 changes: 12 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ COPY deploy-container/rclone-tasks.json /tmp/rclone-tasks.json
# Fix permissions for code-server
RUN sudo chown -R coder:coder /home/coder/.local

# You can add custom software and dependencies for your environment here. Some examples:
# You can add custom software and dependencies for your environment below
# -----------

# 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
# RUN sudo apt-get install -y build-essential
# RUN COPY myTool /home/coder/myTool

# Install apt packages:
# RUN sudo apt-get install -y ubuntu-make

# Copy files:
# COPY deploy-container/myTool /home/coder/myTool

# -----------

# Port
ENV PORT=8080
Expand Down
4 changes: 3 additions & 1 deletion deploy-container/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Docker Hub: `bencdr/code-server-deploy-container`
| `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](https://github.com/cdr/code-server/blob/main/docs/FAQ.md) for details.

## 💾 Persist your filesystem with `rclone`

This image has built-in support for [rclone](https://rclone.org/) so that your files don't get lost when code-server is re-deployed.
Expand Down Expand Up @@ -49,7 +51,7 @@ Now, you can add the following the environment variables in the code-server clou
| RCLONE_REMOTE_NAME | the name of the remote you added in step 2.<br />check with `$ rclone listremotes` | code-server-remote | |
| RCLONE_SOURCE | source directory to sync files in the code-server container | the project directory: `/home/coder/project` | |
| RCLONE_DESTINATION | the path in the remote that rclone syncs to. change this if you have multiple code-server environments, or if you want to better organize your files. | code-server-files | |
| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code ![rclone screenshot from VS Code](../img/rclone-vscode-tasks.png) | true |
| RCLONE_VSCODE_TASKS | import push and pull shortcuts into VS Code ![rclone screenshot from VS Code](../img/rclone-vscode-tasks.png) | true |
```sh

# --- How to use ---
Expand Down
3 changes: 3 additions & 0 deletions deploy-container/myTool/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

echo "This is a demo tool that could be brought into the code-server workspace"