Reputation: 21
I currently try setting up my data-science environment with WSL2 using docker. So my goal is to store everything on windows, using windows Docker Desktop to run Jupyter within a container on WSL2. So I try to mount the c drive within my docker container with the following code executed on Powershell (not the Linux shell):
docker run -v `pwd`:/mnt/c/Users/rener/ -p 8888:8888 minicondacontainer jupyter lab --ip='*' --port=8888 --allow-root --no-browser --NotebookApp.token='' --NotebookApp.notebook_dir='/mnt/c/Users/rener/'
It only binds a new working directory, but not my windows drive. I would really appreciate any help!
Thanks!
Upvotes: 0
Views: 4894
Reputation: 21
I kinda misunderstood "docker -v". My previous command only mounted the current working directory, which did not work, because the PowerShell working directory is windows, while docker is being executed within WSL. The following solved it:
docker run -v /c/Users/rener/:/host/ -p 8888:8888 minicondacontainer jupyter lab --ip='*' --port=8888 --allow-root --no-browser --NotebookApp.token=''
Upvotes: 2