-
Notifications
You must be signed in to change notification settings - Fork 2
Description
It would be nice if the Dokuwiki container were run as www-data (UID:GID 33:33) instead of root.
Best practices aside, running the container as root triggers an chown call on the data directory by the container's entrypoint script, which can be a lengthy procedure. For my wiki it is so long that the readiness probe times out and kills the container long before it is done.
The Dokuwiki behavior makes sense. If the user does not select the correct user for the container, they may also not have done that for the data directory. For a K8S workload this behavior is sub-optimal. Every time the pod is re-located, my Wiki is gone for 5 minutes.
I would like to propose that the correct user is set in the chart, maybe even using a variable, and administrators are advised to set the correct permissions in the data directory (chown -R 33:33 in the end).
My current setting is:
securityContext:
runAsUser: 33
runAsGroup: 33Coding this as a variable, such as dokuwiki.runAsUser would regain some flexibility on the configuration side, but then again, this sanitizing step would be a one-time fix anyways. Any subsequent run only takes time.