rustdevcontainer icon indicating copy to clipboard operation
rustdevcontainer copied to clipboard

Root owner of `.devcontainer` directory

Open cmac4603 opened this issue 4 years ago • 1 comments

After running the relative:

docker run -it --rm -v "/yourrepopath:/repository" qmcgaw/devtainr:v0.5.0 -dev rust -path /repository -name projectname

The directory and all it's files are owned by root.

Any way to change this behavior?

Currently I need to run:

sudo chown -R $USER: .devcontainer 

to access and edit these files.

cmac4603 avatar Jul 10 '21 19:07 cmac4603

Ah good point, try running the Docker run command with --user="$(id -u):$(id -g)" and that should do.

I'll modify the readme with it, might be useful! Let me know if it works though.

I created https://github.com/qdm12/devtainr/issues/3 as well to support a flag for that if it's ran as root to set it as another user id+group ID.

qdm12 avatar Jul 10 '21 19:07 qdm12