As you can see in the image, the terminal spawned off has been spawned as a root user. I need it to be spawned as a non-root user the same assigned to the container, say project-user. If anybody could help me out with this, it would be of great help. Thanks.
@BhuvanRohith the base image for the theia-ful-dockerl image is ubuntu which is different than that of theia-docker and in order to install the necessary dependencies and setup the enviroment sudo was needed. Please note that these images are mainly used as examples and for test purposes, if you require your own implementation or use-case then you can use them as reference. Are you somehow requesting that the theia-full image removes sudo access?
To add a bit of context: in order to be generally useful for software development, the theia docker image examples will usually need to be customised to add project-specific dependencies.
There are a couple of ways I see to enable that. The easiest is to have sudo capability in the image and so permit the user to install/configure whatever they need, for their specific case. Some of our example docker image follow that idea, like theia-full.
In some environment, it’s not desirable/permitted to include sudo capability in docker images. e.g. one needs the image to have a non-privileged user so it can run in some cloud services. The way to customize such an image is by creating a project-specific docker image that "starts FROM" it. Then add and configure as per specific requirements in the derived image. Some of our example docker images follow that idea. e.g. theia-docker and theia-java both have non-privileged users and so can be used as the base image in this alternative.