I want to mount folder in Docker container. Using Command Prompt with WSL2. Then, I typed command like...
docker run -it -u $(id -u):$(id -g) -v \C\Users\<username>\Desktop\mounted_folder:/created_in_run <image_id> bash
conditions:
id -u:1000
id -g:1000
In container, I found that created_in_run
folder is for user root
.(not 1000
)
like...(type with ls -la
)
drwxr-xr-x 2 root root 4096 Dec 7 05:11 created_in_run
Then I tried to touch test
with created_in_run
folder.
But, respond is like...
touch: cannot touch 'test': Permission denied
I couldn't find out how to fix this.
Would you please tell me how to solve this matter???