solr-operator icon indicating copy to clipboard operation
solr-operator copied to clipboard

Run init container cp-solr-xml as nonRoot

Open janhoy opened this issue 2 years ago • 0 comments

Today we use busybox image with root user to run the cp-solr-xml init. This prevents runAsNonRoot: true to be set on the Solr pod. Either find a variant of busybox with non-root user, or explicitly specify runAsUser: 65534 on the init container. Busybox image has a nobody user available ootb that I think we could use:

# docker run --rm busybox cat /etc/passwd
root:x:0:0:root:/root:/bin/sh
daemon:x:1:1:daemon:/usr/sbin:/bin/false
bin:x:2:2:bin:/bin:/bin/false
sys:x:3:3:sys:/dev:/bin/false
sync:x:4:100:sync:/bin:/bin/sync
mail:x:8:8:mail:/var/spool/mail:/bin/false
www-data:x:33:33:www-data:/var/www:/bin/false
operator:x:37:37:Operator:/var:/bin/false
nobody:x:65534:65534:nobody:/home:/bin/false

janhoy avatar Jun 29 '23 08:06 janhoy