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
I would like to know if it is possible to configure Container Tools to start Docker Compose within WSL2, with access to the WSL2 filesystem, just as you could do the following manually from a terminal:
C:\myproject> wsl
root@MACHINENAME:/mnt/c/myproject# docker compose up
My use-case is perhaps a little strange I need to be able to attach a volume to my container that points to a mapped network drive on the Windows host machine via the mount in WSL2. The network location referred to by the mapped drive is a Windows Administrative Share (\\someserver\d$) due to some historic/centralised IT setup and has been assigned the drive letter D: on the host Windows machine.
The docker-compose.yml file I am trying to use from Visual Studio 2022 is as follows, with a few of the labels changed for privacy reasons. Both containers are Linux-based:
Testing the backendapi container separately, I've found that trying to mount a volume using a Windows-style path without WSL results in the /app/release/inputfiles directory appearing empty to the container.
Only starting the container from inside of WSL (as shown above) and using the WSL mount in the style given in the above docker-compose.yml file allows the running backendapi container to see the files present on the share.
I have tried using a CIFS mount but this seems to require storing user credentials within my Docker Compose file and is something I would rather avoid. I have also tried configuring a Global SMB Mapping pointing to the share but this doesn't work either.
The text was updated successfully, but these errors were encountered:
We shipped an update to allow for this in 17.10 Preview 1. See #417 for more information on how to configure this. Let us know in that issue if you run into anything.
I would like to know if it is possible to configure Container Tools to start Docker Compose within WSL2, with access to the WSL2 filesystem, just as you could do the following manually from a terminal:
My use-case is perhaps a little strange I need to be able to attach a volume to my container that points to a mapped network drive on the Windows host machine via the mount in WSL2. The network location referred to by the mapped drive is a Windows Administrative Share (
\\someserver\d$
) due to some historic/centralised IT setup and has been assigned the drive letterD:
on the host Windows machine.The
docker-compose.yml
file I am trying to use from Visual Studio 2022 is as follows, with a few of the labels changed for privacy reasons. Both containers are Linux-based:Testing the
backendapi
container separately, I've found that trying to mount a volume using a Windows-style path without WSL results in the/app/release/inputfiles
directory appearing empty to the container.Only starting the container from inside of WSL (as shown above) and using the WSL mount in the style given in the above
docker-compose.yml
file allows the runningbackendapi
container to see the files present on the share.I have tried using a CIFS mount but this seems to require storing user credentials within my Docker Compose file and is something I would rather avoid. I have also tried configuring a Global SMB Mapping pointing to the share but this doesn't work either.
The text was updated successfully, but these errors were encountered: