Below are some useful things for configuring VSCode for development

Setting Up Dev Container

There are two ways you can set up a development container for VSCode.

Manually Building Docker Image

First you need to build a docker image from your Dockerfile. In shell, navigate to where your Dockerfile exists and run the docker build command. Specify the -t flag to name and tag your image (for example, my-image:latest):

docker build -t my-image:latest .

Verify the image was created by listing all Docker images:

docker images

image.png

Now run a docker container from a specified image:

docker run --name your_container_name -v /path/on/host:/path/in/container my-image:latest

-v specifies volume mounting from host machine to docker container

Now, connect to your remote host as usual. You should see this icon on the left

image.png