Sign in

Mod for code-server

Extension Arguments

This mod installs code-server/openvscode-server extensions at startup. The list of extensions to be installed should be provided using environment variable VSCODEEXTENSIONIDS separated by |.

arch
amd64
built

Use it#

Set DOCKER_MODS on the code-server container and recreate it. The mod is pulled on every start; several mods are separated with |.

DOCKER_MODS=ghcr.io/linuxserver-playground/mods:code-server-extension-arguments

:code-server-extension-arguments always gets the newest build. To stay on this one, pin its tag:

DOCKER_MODS=ghcr.io/linuxserver-playground/mods:code-server-extension-arguments-3bbb175
services:
  code-server:
    image: ghcr.io/linuxserver-playground/code-server:latest
    environment:
      - DOCKER_MODS=ghcr.io/linuxserver-playground/mods:code-server-extension-arguments

Also for openvscode-server.

Details#

NOTE: Since transitioning from v3.12.0 to v4.0.x code-server has been forced to use a new Extensions Gallery / Marketplace. This results in a smaller set of plugins being available to install. Please take this into account before opening an Issue!

A workaround for this is to use the environment variable EXTENSIONS_GALLERY to provide a different marketplace URL. The commandline installer used by this plugin will also use the marketplace provided by this variable.

Please refer to the code-server FAQ for additional information.

For example, to install the vscode-docker and vscode-icons extensions add the following lines to your docker compose service:

  environment:
    DOCKER_MODS: 'ghcr.io/linuxserver-playground/mods:code-server-docker|ghcr.io/linuxserver-playground/mods:code-server-extension-arguments'
    VSCODE_EXTENSION_IDS: 'vscode-icons-team.vscode-icons|ms-azuretools.vscode-docker'
    ## Optionally use a different marketplace if required extensions are unavailable. e.g.:
    # EXTENSIONS_GALLERY: '{"serviceUrl": "https://extensions.coder.com/api"}'
    # EXTENSIONS_GALLERY: '{"serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item"}'

Community project

Improve this mod, or make your own

Mods are how LinuxServer images grow without getting heavier: a Dockerfile, a few scripts and a mod.yml. If this one is missing something, or you need one like it for another image, an AI agent in our harness can build and test it with you.

Ask your agent

  • The code-server-extension-arguments mod <what is wrong>. Fix it, test it and draft the PR.
  • Make a mod like code-server-extension-arguments for <another image>, and test it.

Making a mod Every way to help Get the harness (opens in a new tab)

Source: code-server-extension-arguments branch (opens in a new tab). Every mod