I am using the che.openshift.io
- Eclipse Che from Red Hat. I have a workspace of PHP Laravel Stack. When I try to run commands as SUDO from the php terminal I am getting error.
SUDO - not a command /
SU - must be run from a terminal
Can someone help me to run as root user? I have to install the heroku CLI
from the terminal which can be done only via root user.
In general, containers running as root is a significant security risk + containers are supposed to be immutable and installing anything inside the container is not recommended since after the restart all the packages will vanish.
Eclipse Che workspaces on che.openshift.io
are running against Red Hat OpenShift Online clusters which do not support sudo
and workspace containers are running using the Arbitrary User IDs (This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node). So, Basically you can not execute sudo
from the workspace terminal.
I have to install the heroku CLI from the terminal which can be done only via root user.
In order to support the Heroku CLI from the terminal you have 2 options:
Heroku CLI
installed based on the default php image used in Eclipse Che - https://github.com/eclipse/che-dockerfiles/blob/master/recipes/php/7.1/Dockerfile (and then refer to this image from the custom devfile that will feet your needs)heroku-cli
to the che-plugin-registry
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With