DockerMod to allow installation of code-server extensions by providing a list of extensions to install through environment variable

This commit is contained in:
RoboMagus
2021-11-08 13:58:37 +01:00
committed by dijkr
parent d1dc6e5858
commit a345eb8a9f
7 changed files with 25 additions and 71 deletions
+7 -15
View File
@@ -1,17 +1,9 @@
# Rsync - Docker mod for openssh-server
# Extension Arguments - Docker mod for code-server
This mod adds rsync to openssh-server, to be installed/updated during container start.
This mod installs code-server extensions at startup. The list of extensions to be installed should be provided using environment variable `VSCODE_EXTENSION_IDS` separated by `|`.
In openssh-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:openssh-server-rsync`
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:openssh-server-rsync|linuxserver/mods:openssh-server-mod2`
# Mod creation instructions
* Fork the repo, create a new branch based on the branch `template`.
* Edit the `Dockerfile` for the mod. `Dockerfile.complex` is only an example and included for reference; it should be deleted when done.
* Inspect the `root` folder contents. Edit, add and remove as necessary.
* Edit this readme with pertinent info, delete these instructions.
* Finally edit the `.github/workflows/BuildImage.yml`. Customize the build branch, and the vars for `BASEIMAGE` and `MODNAME`.
* Ask the team to create a new branch named `<baseimagename>-<modname>`. Baseimage should be the name of the image the mod will be applied to. The new branch will be based on the `template` branch.
* Submit PR against the branch created by the team.
For example, to install the `vscode-docker` and `vscode-icons` extensions add the following lines to your docker compose service:
```yaml
- DOCKER_MODS=linuxserver/mods:code-server-docker|linuxserver/mods:code-server-extension-arguments
- VSCODE_EXTENSION_IDS=vscode-icons-team.vscode-icons|ms-azuretools.vscode-docker
```