Adding host volumes to Docker workspaces with the same permissions #16946
Unanswered
rudimk
asked this question in
Workspace Provisioning & Templates
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks. Apologies if this is a dumb question, but been kinda beating my head against this. Essentially, I run Coder on a NUC running Ubuntu, where the current user is
rudimk
, with the UID and GID set to1000
. Now while I've figured out how to modify a template's Terraform to support mounting a folder on the underlying NUC into a workspace, the permissions are a bit off. Locally, the folder(/workspace
) is owned byrudimk:rudimk
. The template(and resultant workspace) is also configured to create the same user and group, but while the UID and GID locally are1000
, the Coder workspace in the container has this set to1010
. So what tends to happen when I mount the folder - the folder within the container is owned byubuntu:ubuntu
, which I'm guessing stems from the base image which means I can't really edit those files(or add new files) to that mounted folder. I've tried running achown
within my Dockerfile but that impacts the permissions on the underlying host, renders the dir unwritable. Is there a way to mount a host dir so that both the underlying host and a Coder Docker workspace can write to the same folder without any trouble?Thanks so much, appreciate it!
Beta Was this translation helpful? Give feedback.
All reactions