<p>I am trying to deploy on a openshift with helm the deployment chart provided for kubernetes/openshift. But I having a problem with the userid that is included in the original image from WSO2. I have not cluster admin permissions on the openshift cluster, so I cannot modify the SCC policies.</p>
<p>In the Dockerfile for WSO2 API Manager the userid is included via ARG, so once this image once is build this userid number cannot be modified. It can be checked here: <a href="https://github.com/wso2/docker-apim/blob/v4.0.0.1/dockerfiles/ubuntu/apim/Dockerfile" rel="nofollow noreferrer">https://github.com/wso2/docker-apim/blob/v4.0.0.1/dockerfiles/ubuntu/apim/Dockerfile</a></p>
<pre><code># set Docker image build arguments
# build arguments for user/group configurations
ARG USER=wso2carbon
ARG USER_ID=802
ARG USER_GROUP=wso2
ARG USER_GROUP_ID=802
</code></pre>
<p>And in the deployment artifact for kubernetes provided by WSO2, that can be checked here <a href="https://github.com/wso2/kubernetes-apim/blob/master/simple/am-single/templates/am/instance/wso2am-deployment.yaml" rel="nofollow noreferrer">https://github.com/wso2/kubernetes-apim/blob/master/simple/am-single/templates/am/instance/wso2am-deployment.yaml</a>, they use this user id in the section:</p>
<pre><code>securityContext:
    runAsUser: 802
</code></pre>
<p>But when I deploy this on the openshift cluster I get the following error:</p>
<pre><code>Forbidden: not usable by user or serviceaccount, spec.containers[0].securityContext.runAsUser: Invalid value: 802: must be in the ranges: [1015490000, 1015499999]
</code></pre>
<p>It is saying basically that I cannot use a userid below of 1015490000, in this case 802, but I don't know how to override this userid without building myself the Dockerfile from WSO2, because every update or change from the original image I would have to build and it does not seem the best approach to solve this.</p>
<p>If anyone could help me to solve this issue.</p>

Burillodev
<p>You can do the following.</p>
<ol>
<li>Remove User from the dockerfile - <a href="https://github.com/wso2/docker-apim/blob/master/dockerfiles/ubuntu/apim/Dockerfile#L76" rel="nofollow noreferrer">https://github.com/wso2/docker-apim/blob/master/dockerfiles/ubuntu/apim/Dockerfile#L76</a></li>
<li>Set permissions for the user directory (${USER_HOME})</li>
</ol>
<blockquote>
<p>RUN chgrp -R 0 /some/directory &amp;&amp; chmod -R g=u /some/directory</p>
</blockquote>
