Replies: 1 comment
-
I think you could aim for the following approach: 1. Dockerfile (ide-image): This Dockerfile builds your Theia application. Initially, it should download only the essential vscode plugins required across all your IDEs (or none at all). Perform any necessary cleanup and minimization to prepare for later stages. This step assumes you have a single Theia Application suitable for all languages. (If this is not the case, please refer to the note at the end). 2. Dockerfile (plugin-image): Create a separate Dockerfile for each programming language, responsible for downloading the required plugins using @theia/cli. The focus here is on gathering vscode plugins; therefore, no minimization is needed. 3. Dockerfile (tool-image): Again, for each language, this Dockerfile contains all necessary compilers, tools, and Node.js to launch Theia. Ensure to clean all caches and remove any system applications that are no longer needed after the tools are installed. Note: Steps 2 and 3 could be combined into a single Dockerfile with different stages if preferred. To assemble each IDE, you would:
If your Theia applications have compile-time differences (e.g., different sets of npm packages for different languages), you might need to merge steps 1 and 2. and create a minimized ide-plugin-image for each language. It’s beneficial to maintain common build steps across these configurations. This should allow to create a Dockerfile that works uniformly for all languages. For instance, you could clone the Theia application sources from a URL passed into the Docker build via an environment variable and then use the exact same build steps for all IDEs. |
Beta Was this translation helpful? Give feedback.
-
I have a question or a use case for you - how would you folks approach this?
Similarly to how you previously created specialized Dockerfiles for Python, PHP, etc., we would now like to build different Theia Blueprints for the various courses - one for working with Java, one for OCaml, etc.
For each blueprint, of course, different extensions will be relevant or should not be present.
In the
theia-blueprint/browser.Dockerfile
(Link) , I found the functionality to build Theia (build-stage) and add runtime dependencies (production-stage). However, when building the image in there, the image is >800MBs. I´d like to remove as much optional functionality as possible to provide a base-line configuration on which we can build for all other courses.Can I select which extensions or plugins to download and build?
Would you say that it makes sense to build a base-line image usable in a multi-stage build so that we´d only need to add, e.g., maven and a java JDK on top?
Looking forward to your response!
Yannik
Beta Was this translation helpful? Give feedback.
All reactions