You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 27, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 27, 2026. It is now read-only.
Ability to change owner of com.docker.devenvironments.code #119
Tell us about your request
I'm still fairly new to Docker so there might be a way around this but everything I've tried has not worked. My issue is that when opening my container in VS Code and the files are mounted in /com.docker.devenvironments.code, the owner of that is not root which causes some issues for my development environment. I think it should mount as the user of the container - in compose if "user: root" is set, then the volume should be mounted as root.
drwxr-xr-x 14 node node 4096 Jun 12 22:35 com.docker.devenvironments.code
Which service(s) is this request for?
Docker Desktop Development Enviroment
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
My project uses the node:16 image so for some reason that volume gets mounted with node being owner and group for all files.
I tried overriding it in my docker-compose.yaml file but that didnt help:
I also tried setting "USER root" in my Dockerfile.dev.
My Dockerfile.dev puts all my src files in /usr/src/app and inspecting that, they are all owned by root. When that then gets mounted, it changes it node and also my node_modules folder weirdly also isnt copied over.
Are you currently working around the issue?
Only workaround I know of is to in the CLI manually change the ownership of the folder recursively:
I came here to say this after giving Dev Environments a try.
I got as far as npm install but it failed to install sharp with an error that the owner of the folder should be the same as the user running npm install.
Activity
phatpaul commentedon Oct 27, 2022
I came here to say this after giving Dev Environments a try.
I got as far as
npm installbut it failed to install sharp with an error that the owner of the folder should be the same as the user running npm install.Any tips?