NCEAS / metadig-engine

MetaDig Engine: multi-dialect metadata assessment engine
7 stars 5 forks source link

run Docker containers as a metadig user #390

Open jeanetteclark opened 9 months ago

jeanetteclark commented 9 months ago

Right now they are all running as root - here is what metadig is doing

mbjones commented 9 months ago

Here's an example of setting a specific UID and GID to run as, so you can better control filesystem permissions.

https://github.com/howweirdistheweather/weather_app/blob/main/helm/Dockerfile#L9

This is hardcoded in the Dockerfile for hwitw, but it also could be a configurable property. Bitnami charts often run as UID 1001 and GID 0, and set all files as g+rwX so they are accessible to the user. If you need the UID to be configurable, maybe it could be determined at runtime via an ENV variable (which might work, but might also be problematic if someone tries to change it on a persistent volume that was previously set differently).