Hi, My team uses VSCode Remote Containers for all of our development. We develop in a Python:3.7-slim Docker container. The Remote Containers plug-in allows us to specify which VSCode plug-ins to install inside the development container and
sonarsource.sonarlint-vscode is one of the plug-ins we use. This enables all of the developers to have the exact same plug-ins.
My questions is: “Is there a way to automatically download the JRE that SonarLine uses?”
Here is our situation: Our teams are Python and NodeJS developers so we don’t have Java in our docker images and adding a Java JRE 8 to our 155MB Python image, for example, would add over 614MB to it! (3x bloat!) This is undesirable. So what we currently do is allow SonarLint to add its own JRE which only requires an additional 124MB of space.
This works until the image gets rebuilt and the new image doesn’t have a JRE and SonarLint complains that it cannot find the JRE specified the settings. Thats when we have to do this little dance. Step 1: Delete the JRE path from the VSCode settings. Step 2: Reload VSCode. Step 3: When SonarLint sees the empty settings and offers to install the JRE say yes. Step 4: Reload VSCode.
My questions is how to avoid this 4 step dance every time the image is rebuilt. What I would like is a way to download the SonarLint JRE in the definition of the VSCode Remote Containers image build which is driven by a separate Dockerfile. Something like
wget would be fine. We could place that in the Dockerfile to include in the image. I can’t seem to find any Java JRE that is as smalls the one SonarLint provides.
Any help would be greatly appreciated.