I have been trying to use the vs-code-bazel extension in my Che workspace, which requires the Buildifier and Bazel runtime executables to be installed:
https://github.com/bazelbuild/vscode-bazel
So I created a new docker image based on: 'quay.io/eclipse/che-java11-maven:7.10.0' and use that as a chePlugin dev container.
However, after I installed the bazel extension it was actually, I suspect, the Theia-IDE container that needs to have the bazel executables installed! So in my workspace, the maven container was working fine, I could execute the bazel runtime, but none of the bazel extension features work.
The hosted-instance-log showed this:
Extension-Host:With stack trace: Error: Command failed: /usr/bin/buildifier --format=json --mode=check --type=build --lint=warn
/bin/sh: /usr/bin/buildifier: not found
Then I realised that the executables are used in another container. I am guessing that's the Theia IDE one, but not 100% sure.
So then I thought I could try to create a new image based on 'quay.io/eclipse/che-theia:7.11.0' and added the bazel installation on the Dockerfile. I have the image available but I don't know where to upload it in order for me to switch to this editor in Che!!
I did try and see if I can add it to the Stacks but there isn't a "Add Stack" button anywhere. I thought I could add it to the devfile using
components
but it doesn't like the "image" tag...
Could anyone help please?
Thank you!
@InterestedInTechAndCake
To use own docker image for editor I made the following:
theia-ide containercomponents section in my devfile with reference to the corresponding meta.yaml:- type: cheEditor
alias: theia-editor
reference: https://raw.githubusercontent.com/RomanNikitenko/che-plugin-registry/master/v3/plugins/eclipse/che-theia/next/meta.yaml
memoryLimit: 2Gi
It works for me!
@InterestedInTechAndCake is that the extension is running in a separate container with your image ?
Could you share your devfile
@RomanNikitenko Thank you very much!! That worked like a charm :-)
@benoitf The extension (presumably you meant the vscode-bazel) runs inside the che-plugin-registry, I didn't run it as a sidecar or separate container. This is the devfile:
apiVersion: 1.0.0
metadata:
name: wksp-xxxx
components:
Most helpful comment
@InterestedInTechAndCake
To use own docker image for editor I made the following:
theia-idecontainercomponentssection in mydevfilewith reference to the correspondingmeta.yaml:It works for me!