Docker Vs Code Container files not showing

Viewed 34

I have created docker container with following command

docker run -p 8081:80 -v $(pwd)/lemp1:/var/www/html --name lemp1 -d adhocore/lemp:8.1

Now I work on lemp1 folder. I am trying to create files and folder on lemp1 folder from file manager in windows (Using WSL2) and getting permission denied error.

PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Ubuntu-22.04\home\myuser\development\lemp1> mkdir sdsdf
New-Item: Access to the path '\\wsl.localhost\Ubuntu-22.04\home\myuser\development\lemp1\sdsdf' is denied.
PS Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\Ubuntu-22.04\home\myuser\development\lemp1> 

And If I remote open docker container with vs code, I dont see any files there. I only see .composer and .vscode server folders. I dont know how to access my lemp1 folder in vs code the right way.

enter image description here

The wow dir I created with vscode remote container mode. But I want my lemp dir here. Not the .composrer and .vscode dirs.

I cant access the lemp1 folder in Windows file explorer because of permission denied error.

enter image description here

enter image description here

the folder I created with docker exec command bin/sh

I want to access container in Windows file explorer and Vs code lemp1 folder as docker container.

0 Answers
Related