<p>I'm new to Openshift/k8s. The docker image I'm running in openshift is using USER blabla.  But when I exec into the pod, it use a different rather than the one in Dockerfile.</p>

<p>I'm wondering why? and how can I work around this ?</p>

<p>Thanks</p>

<p>For security, cluster administrators have the option to force containers to run with cluster assigned uids. By default, most containers run using a uid from a range assigned to the project. </p>

<p>This is controlled by the configured <a href="https://docs.openshift.org/latest/admin_guide/manage_scc.html" rel="nofollow noreferrer">SecurityContextConstraints</a>. </p>

<p>To allow containers to run as the user declared in their dockerfile (even though this can expose the cluster, security-wise), allow the pod's service account access to the anyuid SecurityContextConstraint (<code>oadm policy add-scc-to-user anyuid system:serviceaccount:&lt;your ns&gt;:&lt;your service account&gt;</code></p>
