Quantcast
Channel: Active questions tagged dockerfile - DevOps Stack Exchange
Viewing all articles
Browse latest Browse all 136

Opentelemetry-operator running as root on Openshift/Kubernetes

$
0
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 busyboxARG version=1.22.1USER rootRUN adduser app --disabled-password  ADD --chown=app:root javaagent.jar /javaagent.jarRUN 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 busyboxARG version=1.22.1ADD javaagent.jar /javaagent.jarRUN chmod -R go+r /javaagent.jar        

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


Viewing all articles
Browse latest Browse all 136

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>