You can watch a live demo of the Visual Studio Code Remote - Containers on YouTube.
Docker provides OS-level virtualisation, allowing for the deployment of software packages in isolated environments called containers.
Images are prepacked beforehand and become containers when run on Docker EngineDocker and virtual machines provide similar benefits, however, they are functionally different.
The Visual Studio Code Dev Containers extension allows you to use a Docker container as a developmen environment.
The development workspace folder can be mounted from the local file system in the container. Extensions can be installed and run inside the containers, similarly to the local environment.
The devcontainer.json file tells VS Code how to access or create the development container with the needed tools.
- Remote Development
code --install-extension ms-vscode-remote.vscode-remote-extensionpack
-
SSH into the LIMO using VS Code
- In VS Code, Ctrl + Shift + P to bring up the command pallete
- (Do once if static IP assigned) Search for "Remote-SSH: Add new SSH Host..."
- ssh agilex@<limo_IP>
- Bring up command pallete again, search for "Remote-SSH: Connect to Host..."
- Once connected, "File" -> "Open Folder" and navigate to limo_ros2 workspace
-
Run docker image
- Once in the workspace, VS Code should detect the Dockerfile and ask to build container
- Alternatively, Ctrl + Shift + P to bring up the command pallete and search for Remote-Containers: Rebuild Container