Skip to content

Instantly share code, notes, and snippets.

@ikurni
Created January 11, 2021 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikurni/3c242563570288fb179a20e2ef4cd436 to your computer and use it in GitHub Desktop.
Save ikurni/3c242563570288fb179a20e2ef4cd436 to your computer and use it in GitHub Desktop.
Run Openshift Container as root
### To run Openshift container as root, need to do below command :
oc adm policy add-scc-to-user privileged -z default -n my-project-namespace
oc edit deployment/my-apps-deploy
### Find the securityContext line, and edit :
### securityContext:
### runAsUser: 0
### Save the deployment, and delete pods if the pods hasn't been deleted automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment