How do I run Arangodb on Openshift?
While there are different database images available for OpenShift Container Platform users as described here , others, including Arangodb, are not yet available. I tried to install the official Arangodb container from Dcokerhub by running the following command using the Openshift CLI:
oc new-app arangodb
but it does not start successfully causing the following error:
chown: changing ownership of '/var/lib/arangodb3': Operation not permitted
It has to do with permissions. By default, OpenShift launches containers using a randomly assigned user ID, rather than as a root as described in Support Arbitrary User IDs . I tried to use directory and file permissions, which can be written by processes in the image to be owned by the root group, and read / written by that group in the Dockerfile:
RUN chgrp -R 0 /some/directory \
&& chmod -R g+rwX /some/directory
This time it throws the following error:
FATAL cannot set uid 'arangodb': Operation not permitted
Looking at the script that initializes arangodb (arangod script), arangodb works like arangodb: arangodb, which should (or maybe !!!) be arangodb: 0 in the case of Openshift.
Now I am really confused. I have read and searched a lot:
- Getting Docker image in your own OpenShift cluster
- Docker user spaces arrived!
- new app doesn't work on some official Docker images due to chown Permissions
- I also tried reverse engineering by looking at the mongodb image provided by hoist. But in the end I was more confused.
I also don't want to ask the cluster administrators to allow the project to run as root:
# oadm policy add-scc-to-user anyuid -z default
The more I read, the more embarrassed I get. Has anyone done this before this can provide me with a docker container that I can run in Openshift?
source to share
No one has answered this question yet
Check out similar questions: