Having the container running in OpenShift with a user ID from a higher
range is a security good practice. The user ID won't match any user ID on
the host. As an alternative to what Tim proposed you could modify your
docker image and allow access to root group (0) to the necessary files. The
user running the process inside the container on OpenShift is always part
of this group and this group has no rights on the host.

Best Regards,

Frédéric

On Thu, May 24, 2018 at 5:49 PM, Tim Dudgeon <[email protected]> wrote:

> Tomcat images usually run as a specified user, whilst OpenShift by default
> assigns an arbitary user ID to the container, and that  arbitary user
> probably does not have permissions to read the server.xml file.
>
> You need to 'relax' the settings on the SCC to allow the container to run
> as the user specified in the dockerfile.
> e.g. https://docs.openshift.org/latest/admin_guide/manage_scc.
> html#enable-images-to-run-with-user-in-the-dockerfile
> (though that's only one way to do this).
>
> Tim
>
> On 24/05/18 16:28, Brian Keyes wrote:
>
> I am attempting to run a docker created image in openshift
>
> I have created a docker image for apache tomcat ,and can launch a
> container in docker with it and it will run fine and continue to run
>
>
> but when i push that up to docker hub and try to pull it down to the
> openshift console by going to "add to project" and then "deploy image" i
> seems to build it and run it fine but I get this error and the container
> crashes
>
> ay 24, 2018 3:12:18 PM org.apache.catalina.startup.Catalina load
> WARNING: Unable to load server configuration from [/usr/local/tomcat/conf/
> server.xml]
> May 24, 2018 3:12:18 PM org.apache.catalina.startup.Catalina start
> SEVERE: Cannot start server. Server instance is not configured.
>
>
>
> any ideas ????
>
> thanks
>
>
>
>
> _______________________________________________
> users mailing 
> [email protected]http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 
*Frédéric Giloux*
Principal App Dev Consultant
Red Hat Germany

[email protected]     M: +49-174-172-4661

redhat.com | TRIED. TESTED. TRUSTED. | redhat.com/trusted
________________________________________________________________________
Red Hat GmbH, http://www.de.redhat.com/ Sitz: Grasbrunn,
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Paul Argiry, Charles Cachera, Michael Cunningham, Michael
O'Neill
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to