Skip to content

code-server --install-extension causes earlier extensions to be removed from extensions.json in layered Docker builds #7326

Open
@sevetseh28

Description

@sevetseh28

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

When building a Docker image for code-server in multiple layers, I install a set of extensions in a base image using code-server --install-extension. In a later image that builds on this base, I install additional extensions. However, I’ve observed that only the most recently installed extensions remain listed in ~/.local/share/code-server/User/extensions.json. Earlier ones get removed from the file, even though their directories still exist under extensions/.

Steps to Reproduce

  1. Build a base image with some extensions using code-server --install-extension.
  2. In a different Dockerfile, use the base image built from 1 and install additional extensions.
  3. Start code-server and observe only the latest extensions appear.

Expected

All installed extensions (across layers) should be retained and visible in extensions.json.

Actual

Only extensions from the last --install-extension step are listed; others are silently dropped.

Logs

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

I did not test native VS Code

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions