Correct way to define users with Docker (unRAID)


Recommended Posts

My original Docker container (for SongKong) was created for use with  Qnap (http://www.jthink.net/jaikozforum/posts/list/20064.page) , created a songkong User and Group

 

RUN addgroup -S songkong \

&& adduser -S -G songkong songkong

 

But this did not work well because then SongKong did not have permission to read/write some files

So I removed the user so SongKong defaults to running as root

However we see on unRaid this means that although it can now modify any files if it moves them they get created as user root, group root umask 000. Whereas the original files are owned by nobody, group everyone umask 755 which means they cannot be modifed/deleted outside of unRAID.

 

Can anyone suggest an approach whereby SongKong Docker has access to all files but create them as the nobody user with full permissions, will this be compatible with non UNRAID systems such as Qnap ?

Edited by Paul Taylor
Link to comment
My original Docker container (for SongKong) was created for use with  Qnap (http://www.jthink.net/jaikozforum/posts/list/20064.page) , created a songkong User and Group
 
RUN addgroup -S songkong \
&& adduser -S -G songkong songkong
 
But this did not work well because then SongKong did not have permission to read/write some files
So I removed the user so SongKong defaults to running as root
However we see on unRaid this means that although it can now modify any files if it moves them they get created as user root, group root umask 000. Whereas the original files are owned by nobody, group everyone umask 755 which means they cannot be modifed/deleted outside of unRAID.
 
Can anyone suggest an approach whereby SongKong Docker has access to all files but create them as the nobody user with full permissions, will this be compatible with non UNRAID systems such as Qnap ?
Probably best to reach out to linux server.io (@CHBMB)

Sent from my NSA monitored device

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.