1

I need this opentelemetry-operator to run as non-root on the /,

https://github.com/open-telemetry/opentelemetry-operator/blob/main/autoinstrumentation/java/Dockerfile

I need to change the permission as non-root /javaagent.jar, my pipeline is running as buildconfig.

I tried this,

FROM busybox
ARG version=1.22.1
USER root
RUN adduser app --disabled-password  
ADD --chown=app:root javaagent.jar /javaagent.jar
RUN chmod -R go+r /javaagent.jar        
USER app

It's working on the docker side, but Openshift is preventing it to run. This is for init containers, it's for copying the javaagent.jar to the main container.

If it root ownership, it will run,

FROM busybox
ARG version=1.22.1
ADD javaagent.jar /javaagent.jar
RUN chmod -R go+r /javaagent.jar        

Is it okay for /javaagent.jar as root ownership in Openshift?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.