-
I'd like to build custom docker images based on this project with a number of extensions preinstalled during the image build process, e.g. for reproducible, versioned throwaway dev setups. It doesn't seem to be possible to do this using |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
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.) |
Beta Was this translation helpful? Give feedback.
-
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
|
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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:
For tools not releasing their vsix via github, I copy them directly from the build environment. |
Beta Was this translation helpful? Give feedback.
-
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 # 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 This will install the latest version of the extension of your choice. EDIT: The |
Beta Was this translation helpful? Give feedback.
-
Starting from version 1.62, when you start a server with server.sh you can pass |
Beta Was this translation helpful? Give feedback.
Starting from version 1.62, when you start a server with server.sh you can pass
--install-extension extension_id
or--install-builtin-extension extension_id
.