-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Installing extensions from command line #171
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
Comments
@ThorbenJensen have you tried using |
@sr229 I would like to be able to install extensions from the command line - before accessing code-server in the browser. |
@ThorbenJensen I guess you want to pre-load some extensions before running. |
@jeasonstudio I think this goes into the right direction, thank you. Is there anything I can do (e.g. |
@ThorbenJensen For now, you can just copy cp -r $HOME/.vscode-insiders/extensions/spywhere.guides-0.9.3 $HOME/.code-server/extensions/spywhere.guides-0.9.3 |
@jeasonstudio Thank you for the hint. Nonetheless, I will check out code-server again in a few months. As far as I am concerned, this issue can be closed. |
@ThorbenJensen I think you can do this by just extending the Dockerfile as @jeasonstudio suggests. For example, the following installs the Preview extension. I needed it because I couldn't get the built-in Preview functions to work out-of-the-box and also it comes with Mermaid diagram support, which the built-in previewer does not.
The lines above do the following.
If all goes well, you should be able to get the following. Hope this helps! |
A lightweight alternative could be to use workspace recommended extensions |
This is currently not supported. What needs to be done to enable workspace extensions team? |
@faustomorales great ideas, thanks a lot! So, heavily inspired by what you suggested, this is the Dockerfile that works for me:
If anyone is interested in testing this Dockerfile:
Thanks, again :-) |
Resolved in #504 |
@ThorbenJensen I tried your dockerfile above and it fails to build and here is the output from the build.
|
@jagraj The recommended way to install extensions now is to use |
@jagrag I can confirm that |
Note that while it does work, it imposes a root requirement on the containerized system, iow VS Code now works only for root-owned containers. Trying to run it as non-root (e.g. |
@faustomorales , I think the default location for VS extensions can be made more general to allow for non-root containers, thus:
@deansheather , hard-coding root folder in the default extensions location may be the reason why the new More info
|
Thanks @faustomorales! |
above solutions are not working? any more solutions? @faustomorales @ThorbenJensen @coadler |
@sanjayme97 I needed a container for python data science running on EC2 with code-server up and running. This is my custom dockerfile which builds successfully
See if this works. extensions can be separated to a single run command too. But I have put this up hastly and haven't tested that approach |
Linking to this issue, this is still an issue. Some extensions are not found
or if you try to install them from .vsix you get something like this
|
code-server uses Open VSX for the extension marketplace and the cpptools extension is not on there so there is unfortunately nothing we can do about it. microsoft/vscode-cpptools#12269 (comment) As for the extract error, that makes it seem very likely that the vsix is corrupted. Are you able to unzip it on the command line? Might need to download it again. |
Yes, bsdtar is able to unzip the file, however this does not seem to be what code-server uses, so it fails. |
Oh interesting. I think VS Code is using https://github.com/thejoshwolfe/yauzl |
It would be great to be able to script the installation of extensions,
e.g. after starting code-server in a new container.
A feature similar to VScode's
code --install-extension
would be very helpful.See the example here.
Or am I missing another way to install extensions to code-server from the command line?
The text was updated successfully, but these errors were encountered: