Eclipse Che - Set container in privileged mode
Hi,
With the latest version of che5.8.0 - when i tried to set PRIVILEGED MODE -> it does not work
- docker run -it --rm -v /usr/local/codenvy/chedata:/data -v /var/run/docker.sock:/var/run/docker.sock eclipse/che start
- edit - /usr/local/codenvy/chedata/che.env set CHE_DOCKER_PRIVILEGED = true 3.restart che server container 4.docker inspect ce4 |grep CHE_DOCKER_PRIVILEGED => does not return anything.
What's wrong here ..
It is working. That flag enables privileged mode for containers created by Che when you start a workspace. It is not for the Che container itself.
Tyler
On Apr 18, 2017, at 3:35 AM, mvidhya86 [email protected] wrote:
Hi,
With the latest version of che5.8.0 - when i tried to set PRIVILEGED MODE -> it does not work
docker run -it --rm -v /usr/local/codenvy/chedata:/data -v /var/run/docker.sock:/var/run/docker.sock eclipse/che start edit - /usr/local/codenvy/chedata/che.env set CHE_DOCKER_PRIVILEGED = true 3.restart che server container 4.docker inspect ce4 |grep CHE_DOCKER_PRIVILEGED => does not return anything. What's wrong here ..
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @TylerJewell - thanks for your comment. why is the value not true for this case docker inspect ce4 |grep CHE_DOCKER_PRIVILEGED. How do i confirm that CHE_DOCKER_PRIVILEGED is set for workspaces
You can start a workspace and then do something inside that workspace which requires privileged mode to verify it. After the workspace has started you can inspect the new container. There is no value in inspecting the Che container itself.
Tyler
On Apr 18, 2017, at 3:46 AM, mvidhya86 [email protected] wrote:
Hi @TylerJewell - thanks for your comment. why is the value not true for this case docker inspect ce4 |grep CHE_DOCKER_PRIVILEGED. How do i confirm that CHE_DOCKER_PRIVILEGED is set for workspaces
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi, i have doubt whether i properly set CHE_DOCKER_PRIVILEGED. after setting it to true in che.env => i did docker restart of che server container. As per the configuration docs - "run che config to apply this configuration to your system. che start also reapplies the latest configuration" - how do i check this
Also for me after creating workspace - privileged mode does not reflect (e.g. c++ stack does not enable debugger). Inspecting workspace container neither returns value for docker inspect cid |grep CHE_DOCKER_PRIVILEGED
@mvidhya86 just checked - privileged mode works fine for me.
To set privileged mode just set CHE_DOCKER_PRIVILEGED=true in che.env and restart Che.
To ensure that your workspace is running in privileged mode just inspect workspace container:
docker inspect <your workspace container> | grep Privileged
Hi @mmorhun
How did you restart Che - by docker restart command or che stop and start commands. Could you help me here ..
docker inspect
@mvidhya86 I restarted Che with restart cli command. But you can use stop and then start as well, up to you.
Privileged mode is applied only to your workspaces not to Che server.
To apply privileged mode:
- Stop your workspace and Che server.
- Edit
che.env, setCHE_DOCKER_PRIVILEGED=true(check property name carefully or just copy paste it; make sure that you remove#symbol in the sample if you use it). Save changes toche.envfile. - Start Che server, start your workspase.
- Open an terminal and inspect your workspace container (not Che server). Now it should be started in privilage mode.
Thanks, workspace container inspect works fine and shows Privileged as true