Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 3.07 KB

README.md

File metadata and controls

69 lines (45 loc) · 3.07 KB

Introduction to developing with Docker and VS Code

You can watch a live demo of the Visual Studio Code Remote - Containers on YouTube.

Why Docker

Docker provides OS-level virtualisation, allowing for the deployment of software packages in isolated environments called containers.

Docker Architecture

Images are prepacked beforehand and become containers when run on Docker Engine

Docker vs virtual machines

Docker and virtual machines provide similar benefits, however, they are functionally different.

Docker VM Differences

Visual Studio Code Remote Development

The Visual Studio Code Dev Containers extension allows you to use a Docker container as a developmen environment.

Dev Containers

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.

Visual Studio Code First Time Setup on Local PC

  • Remote Development
code  --install-extension ms-vscode-remote.vscode-remote-extensionpack

Connect to LIMO and start container

  1. 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
  2. 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

References

  1. VS Code Remote Development
  2. Useful template for reference