[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

oc new-app with root privileges



Hi,

I created my own image which can use s2i to use git urls for my internal projects.

The image has been created such that the systemd services will be working, and in order to do that the image had to be created with root user.

Now the container spawned from this image only works properly i spawn it with the below command:

docker run -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d my-image-name

The container works fine.

Unfortunately, whenever I try to create the container from the openshift ui, it creates the pod successfully but it doesn't have access to run it since it doesn't run it as a root user.

I tried to provide this command:

oadm policy add-scc-to-user anyuid -z project-name

But still the pod is created without the root user.

Is there any way to run the pod with root user via both cli or ui?

--
Thanks & Regards,
Akshaya Khare
312-785-3508

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]