I am trying to run /kaniko/executor in corporate OKD cluster to build docker images as part of CI process using Jenkins. This is the first time we are trying to introduce kaniko in our OKD cluster .
The Jenkins agent workload runs as pod inside the OKD cluster and kaniko runs as a container within the pod.
I could see the kaniko file system is root owned. The current CI process in the org requires the runner pods to execute as non root in the OKD cluster.
Is there a way I can execute the /kaniko/executor as non-root user instead of root?
Kaniko image - gcr.io/kaniko-project/executor:v1.5.1-debug
PS: I tried to build the /kaniko/executor from source and tried adding full permissions (chmod -R 777) to /kaniko and /workspace directories in the Dockerfile and built the new image.
When tried to execute the /kaniko/executor command, got the below error.
Error: error resolving dockerfile path: copying dockerfile: chown /kaniko/Dockerfile: operation not permitted
Any suggestions to get this work?