meilisearch / meilisearch-kubernetes

Meilisearch on Kubernetes Helm charts and manifests
https://www.meilisearch.com
MIT License
212 stars 59 forks source link

Meilisearch Pod fails on Openshift due to root permission denial #68

Closed NathalieNX closed 3 years ago

NathalieNX commented 3 years ago

We are using Openshift, and none of the pods have root access (for security reasons). This means the line in the Dockerfile CMD ["/bin/sh" "-c" "./meilisearch"] fails with message Error: Permission denied (os error 13), and the meilisearch fails with a CrashLoopBackoff error.

We were able to reproduce this behavior by creating a debug pod and running the command with the same result :

~ $ /bin/sh -c ./meilisearch
Error: Permission denied (os error 13)

Do you know why root access is needed for this operation ? Do you know of any workarounds ? Thanks in advance.

alallema commented 3 years ago

Hi @NathalieNX, Thanks for raising this issue but I need some details about the context:

NathalieNX commented 3 years ago

Thanks for the questions :

I hope this helps, please tell me if you need more details.

alallema commented 3 years ago

Hi @NathalieNX, Thanks for your info. Everything looks good to me. meilisearch will never need root rights to run just write rights. So I guess the problem came from the fact that in Openshift the image is built as root and needs to run as the root user. But I suppose recommended best practice is to avoid containers that need to run as root. Hope this will help you

alallema commented 3 years ago

I'm closing this issue because it is outdated. Feel free to reopen it if you need it.