How do I use/install bazel?

I am wanting to try out theia, but my workflow includes using bazel, and a few other custom things in my environment. How do I install these in the docker? apt-get requires sudo, and sudo is not installed?

[original thread by AYF]

[Sebastian König]

Hi @realz!
I believe, this question contains a few points that need to be unpacked. Probably the most urgent question is how to install anything in a docker image. I think, this question is not related to Theia but might help.
The second point where you mention “sudo is not installed”, can you clarify, where sudo is not installed. I imagine, this is a problem of the host machine, you are running docker from. Maybe this helps?
As for bazel, there are different ways of installing it as far as I know. One way involves setting an apt repository and installing it from there. another one is by downloading an installer shell script. For the first way, could be a starting point.
After that, I think, you can go on with the Theia setup.

Hi, which image do you use as base?

@realz At least one of our images has sudo pre-installed and configured: theia-full:


I am using the cpp image


Thank you.


I’ve written a custom Dockerfile that pulls in the theia image, and installs the things I want. Thank you all.

@realz Sounds like a good approach

@realz Actually I think we would welcome a contribution that adds bazel to our theia-cpp image, if you’d like to submit a PR. That way no maintenance on your end :slight_smile: