0

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?

uniwinux
  • 19
  • 5
  • While Stack Overflow does permit certain questions about Kubernetes, we require that they (like all questions asked here) be specifically related to programming. This question does not appear to be specifically related to programming, which makes it off-topic here. You might be able to ask questions like this one on [sf] or [DevOps](https://devops.stackexchange.com/). – Turing85 Apr 04 '23 at 14:13

0 Answers0