Skip to content

Conversation

matthewjmarangoni
Copy link
Contributor

@matthewjmarangoni matthewjmarangoni commented Sep 10, 2025

This PR adds a devcontainer configuration that forwards common ports used during development including those for WebRTC. Installation of kraftkit and updating/upgrading occur on container creation using the onCreateCommand key. The latest Ubuntu LTS is used in an attempt to maintain some parity with the build pipeline.


Note

Add VS Code devcontainer based on Ubuntu with Docker-in-Docker, Go/Node features, kraftkit install on create, and forwarded TCP/UDP ports (incl. WebRTC).

  • Dev Environment:
    • New /.devcontainer/devcontainer.json:
      • Base image mcr.microsoft.com/devcontainers/base:ubuntu with features: Docker-in-Docker, Go, Node (latest).
      • onCreateCommand: apt setup, add Unikraft repo, install kraftkit, system upgrade.
      • Forward ports: 444 (Kernel Images API), 8080 (Web Interface), 9222 (CDP); UDP range 56000-56100 for WebRTC.

Written by Cursor Bugbot for commit d028f0e. This will update automatically on new commits. Configure here.


TL;DR

Adds a devcontainer configuration to standardize the development environment.

Why we made these changes

To create a consistent development environment that mirrors the build pipeline, simplifies onboarding, and automates the installation of necessary tools like kraftkit.

What changed?

  • Added .devcontainer/devcontainer.json to define the development environment.
  • The container is based on Ubuntu LTS and includes features for Docker-in-Docker, Go, and Node.js.
  • Uses onCreateCommand to automatically install kraftkit and run system updates on container creation.
  • Forwards TCP ports 444 (API), 8080 (Web), 9222 (CDP), and the UDP port range 56000-56100 for WebRTC.

Validation

  • Devcontainer builds and starts successfully.
  • kraftkit is installed and available in the container's terminal.
  • Forwarded ports are accessible from the host machine.

Description generated by Mesa. Update settings

Copy link

@mesa-dot-dev mesa-dot-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Performed full review of 330685e...66546af

Tip

⚡ Quick Actions

This review was generated by Mesa.

Actions:

Slash Commands:

  • /review - Request a full code review
  • /review latest - Review only changes since the last review
  • /describe - Generate PR description. This will update the PR body or issue comment depending on your configuration
  • /help - Get help with Mesa commands and configuration options

1 files reviewed | 2 comments | Review on Mesa | Edit Reviewer Settings

"version": "latest"
}
},
"onCreateCommand": "sudo apt-get -y update && sudo apt-get -y install ca-certificates curl gnupg lsb-release && sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.pkg.kraftkit.sh/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/unikraft.gpg && echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/unikraft.gpg] https://deb.pkg.kraftkit.sh /\" | sudo tee /etc/apt/sources.list.d/unikraft.list >/dev/null && sudo apt-get -y update && sudo apt-get -y install kraftkit && sudo apt-get -y upgrade",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Medium Security

The onCreateCommand downloads and installs kraftkit from an external source without checksum verification. Consider verifying the GPG key fingerprint and using a specific version of kraftkit to ensure reproducible and secure builds. The current approach trusts the GPG key from the URL without verification.
Agent: 🤖 General

"ghcr.io/devcontainers/features/go:1": {},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": false,
"version": "latest"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Low Logic

Using "latest" for Node.js version can lead to inconsistent development environments across team members and over time. Consider pinning to a specific version or LTS version for reproducible builds.
Agent: 🤖 General

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant