Skip to content
Simran Cheema edited this page Aug 18, 2026 · 2 revisions

What is Docker?

Docker is a platform designed to simplify the process of developing, deploying, and running applications using containers. Containers package an application together with all its dependencies (such as libraries, tools, and configuration files) into a single portable unit. This ensures the application runs reliably across different environments — whether on various operating systems, hardware architectures, or in the cloud.

The key difference between virtual machines (VMs) and Docker containers is that containers share the host system’s kernel (the core part of the OS that manages system resources), while VMs each run their own full operating system and kernel. As a result, VMs are generally more resource-intensive, while containers are lightweight and faster to start.

How does Docker work? (In our context)

To create a Docker container (a running instance of a pre-built environment), we use a Dockerfile. A Dockerfile defines the step-by-step instructions to build a Docker image, starting from a base image (e.g., Ubuntu 24.04) and adding all the dependencies and configurations needed for our application.

In this repository, the Dockerfile starts with the Ubuntu 24.04 base image, installs all required tools and dependencies, and then sets up ROS2 Jazzy (along with related ROS packages). Finally, it sources our ROS workspace so that when the container is launched, everything is ready to use. For example, after running the container, you can open its terminal and run any ros command without additional setup.

Key terminology:

  • Docker image: A blueprint or snapshot of an environment.
  • Docker container: A running instance of that image (similar to a lightweight VM).
  • Dockerfile: A script that defines how the Docker image is built.

Why use Docker?

Because containers are lightweight compared to VMs, they’re more efficient in terms of CPU, memory, and storage usage. Once set up, they’re also easier to reproduce, share, and deploy. In our project, Docker provides several advantages:

  • Compatibility: Run software or OS versions that might not be natively supported on your host machine.
  • Consistency: Standardize the build, test, and development environments to prevent dependency-related issues.
  • Portability: Easily move the same environment between different computers or to the rover’s onboard system.
  • Deployment: Simplify the process of pushing our system onto the rover by ensuring all dependencies are pre-installed and configured.

Clone this wiki locally