In the glayout coding example, if you're using WSL...
# ieee-sscs-dc-24
a
In the glayout coding example, if you're using WSL do you run vscode from ubuntu or from windows?
Also, do we use the same run commands to create a docker image that we did in the installation video?
(I'm referring to the vscode terminal because that's what it looks like he's doing in the video)
s
Connect VS Code to your WSL system, and when you run the docker container mount the directory you will be working in
As for your next question, the run command is the
docker run
command that uses the image you have built using
docker build
to make a container
a
how would I mount the directory? My bad I'm a little confused here. It looks like vscode is connected to my wsl though
https://docs.oracle.com/en-us/iaas/Content/File/Tasks/mountingwindowsos.htm I've been reading this and I've been getting more confused
s
the
-v
field in the run command in the docker run command does this for you. In the command we provided for you we provide the field
-v $(pwd):$(pwd)
. What this does is mount your current working directory into the docker container so you can access the files within the container.
For example if you were in directory /Documents/project1 in your WSL instance, and you run the docker run command we give you while you were in the directory, the container that starts because of this command will have access to all the files in /Document/project1
a
so I would run, then just use code .?
s
Yeah
Do you know why they add a period right next to code?
It opens code in your current working directory
a
I see, looks like it works. So for the via example do I just code in this directory?
ignore the cisco file I think it must've been there when I was testing out WSL
s
yeah code in the directory
a
sounds good!