Comments (6)
Possible workaround is to extract the vsix to the extensions directory directly like so:
FROM gitpod/openvscode-server:latest
USER root
RUN apt-get update && apt-get -y install zip
COPY fuzion-lang-0.1.0.vsix /home/
RUN mkdir /home/openvscode-server-v1.60.2-linux-x64/extensions/fuzion/
RUN unzip /home/fuzion-lang-0.1.0.vsix "extension/*" -d /home/openvscode-server-v1.60.2-linux-x64/extensions/fuzion/
USER openvscode-server
from openvscode-server.
Seconded, we're currently shipping Eclipse Theia as part of our development environment docker images with a list of plugins as described here so our users don't have to install pyright etc. themselves. However, Theia doesn't ship with an extension store for users to fiddle with (= install, uninstall, upgrade) extensions and that would be a nice feature to add to our offering. (We also have no interest in writing our own Theia extensions.)
from openvscode-server.
We are looking at rolling this out as some workstations for some of our team. This would be a massive help.
I am curious how this would work mixing extensions installed in docker vs ones that are updated or installed into the workspace.
from openvscode-server.
I copy them to the workspace to get rid of any version number dependencies. There also is a tool called lastversion, which gets up to date version numbers from github:
RUN export EXTENSION=redhat.java-$(lastversion microsoft/vscode-java-test) && \
lastversion --assets microsoft/vscode-java-test -d /home/workspace/.opencode-server/extensions/$EXTENSION.vsix && \
mkdir -p /home/workspace/.opencode-server/extensions/$EXTENSION && unzip /home/workspace/.opencode-server/extensions/$EXTENSION.vsix -d /home/workspace/.opencode-server/extensions/$EXTENSION && mv /home/workspace/.opencode-server/extensions/$EXTENSION/extension/* /home/workspace/.opencode-server/extensions/$EXTENSION
For tools not releasing their vsix via github, I copy them directly from the build environment.
from openvscode-server.
Allright so I've been fighting with this for a bit of time.
@michaellilltokiwa 's example did not work for me.
I went with @oldirtybasti's suggestion, without using lastversion
and finally settled on the following solution to install extensions at build time:
# First, you'll need to retrieve the unique identifier associated to the extension
# It can be found on VSCode extension marketplace: https://marketplace.visualstudio.com/items?itemName=ms-python.python
# The unique identifier for this extension is: ms-python.python
# A unique identifier is usually defined using the following format PUBLISHER.PACKAGE
# Just update the EXT_PUBLISHER and EXT_PACKAGE environment variables appropriately.
## Python extension ID: ms-python.python
RUN EXT_PUBLISHER=ms-python EXT_PACKAGE=python && \
mkdir -pv "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}" && \
curl -sSL "https://${EXT_PUBLISHER}.gallery.vsassets.io/_apis/public/gallery/publisher/${EXT_PUBLISHER}/extension/${EXT_PACKAGE}/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" | bsdtar xvf - --strip-components=1 -C "/home/workspace/.openvscode-server/extensions/${EXT_PUBLISHER}.${EXT_PACKAGE}"
Make sure that you have both curl
and bsdtar
binaries available in your image for the commands above to work.
This will install the latest version of the extension of your choice.
EDIT: The code --install-extension
CLI approach would be the best indeed but I'm not sure if that's going to be possible as I think we'd need to have the VSCode server running first before you could use it to install extensions.
from openvscode-server.
When you start a server with server.sh you can pass --install-extension
or --install-builtin-extension
.
from openvscode-server.
Related Issues (20)
- REH no longer works on Alpine as of 1.83.0
- [feature] Provide a way to set the initial User settings that a new session will recieve HOT 2
- Editor Fails to Display MasterPage and Lightboxes .js Files
- Security report
- 'createFileSystemWatcher' does not detect changes when source was unzipped
- Serving static files from a CDN
- Docker Image and VSCode secretsStorage persistence on browser refresh. HOT 1
- Extensions possibly don't inherit PATH/environment correctly? HOT 2
- GitHub extension login loop on every page refresh HOT 2
- Bug: doesn't load in Safari
- FIeld ID's not updating in Wix IDE HOT 2
- Bug: Building with token fails
- How to build a release package of openvscode-server?
- Problem with the push command
- Could not load vsce-sign module Cannot find module '@vscode/vsce-sign' HOT 4
- multiple extensions failing: Unknown method $activateByEvent on actor ExtHostLogLevelServiceShape HOT 2
- JS Service crashed 5 times..
- Extension details not populating
- Extension(s?) Not Available in Marketplace HOT 1
- Allow user to change markplace
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openvscode-server.