[stable/anchore-engine] runAsNonRoot Error
We're using pod security policies and I'm getting this error when trying to deploy anchore-engine:
Error: container has runAsNonRoot and image has non-numeric user (anchore), cannot verify user is non-root
I noticed that the engine runs as the "anchore" user but it's not being specified by it's UID. Can this be fixed or does this need to be run as a privileged pod?
Thanks @webbdog28 Anchore indeed does not run as root.
Looks like the solution is: at pod level "runAsUser or have the USER directive defined (using a numeric UID) in the image"
So this seems achievable in the chart without changing the image itself. Anchore uses uid:gid 1000:1000.
As a workaround, using something like kustomize or github.com/replicatedhq/ship should let you set the runAsUser field until it is updated in the chart itself.
@Btodhunter, let's look at this for an update to the chart
@webbdog28 - I put in an update to add security contexts with runAsUser: 1000 & runAsGroup: 1000 to all pods in our deployments. I think this will solve your issue. Give chart v1.3.3 a try and let me know if it helped. Thanks!
Will do. Thank you gentlemen! Appreciate the fast response!
@webbdog28 can you confirm if the issue is resolved and close this if it is? thanks!
Confirmed!