FileFlows
FileFlows copied to clipboard
Sugestion: Allow the FileFlows Server/Node to be run as a specific user in Docker
At the moment it's not yet possible out of the box to run Fileflows as an user other than root. I've made a temporary entrypoint script to enable me to get around this limitation. Basically, my script does the following:
- It changes ownership of /app to
: - It adds user of
and group of - It executes
/app/docker-entrypoint.shas the created user.
I would propose the following to easily change the user running FileFlows by implementing the following in the entrypoint script:
- Check if the enviornment variables
PUIDandPGIDhave been set. If not, just run FileFlows normally as root. - Optionally you may want to assume that
PGID=$PUIDifPGIDis not set, just a suggestion. - Add the new group:
groupadd -g $PGID fileflows - Add the new user:
useradd -u $PUID -g $PGID fileflows - Change the ownership of the /app directory to the new user:
chown -R fileflows:fileflows /app - Run FileFlows as the new user:
- Node:
su -c "/dotnet/dotnet FileFlows.Node.dll --docker true" fileflows - Server:
su -c "/dotnet/dotnet FileFlows.Server.dll --urls=http://*:5000 --docker" fileflows
- Node:
Make sure that the new user has read and execute access to the /dotnet/dotnet executable.
Don't give the user more rights than it needs to advoid security risks.