Skip to content

[Hackathon] Add DevContainer Support to Device Management Toolkit Repos #383

@rsdmike

Description

@rsdmike

🔹 Overview

To simplify development environments and enable contributors to get started quickly, we want to add DevContainer support for the following repositories in the device-management-toolkit organization:

This will allow developers to spin up consistent, containerized development environments using Visual Studio Code's Dev Containers feature.

We already have a Go-based example in the console repo:
console/.devcontainer

For more information on DevContainers:
VS Code Dev Containers

🎯 Task Scope

  • Step 1: Create a .devcontainer/ directory in each repository.
  • Step 2: Add a devcontainer.json file specifying:
    • Base image suitable for the tech stack (Node.js for mps, rps, mps-router; Angular for sample-web-ui).
    • Pre-installed extensions relevant to the stack (e.g., Angular, TypeScript, Node.js, Docker).
    • Post-create commands to install dependencies.
  • Step 3: Add a Dockerfile if customization is required (e.g., additional dependencies). Be sure not to confuse with our prod dockerfiles.
  • Step 4: Configure port forwarding and shared volumes for live reload and debugging.
  • Step 5: Test the DevContainer setup by:
    • Opening the repo in VS Code using the DevContainer.
    • Ensuring all dependencies are installed and the app runs successfully.
  • Step 6: Document usage instructions in the README.md of each repo.

📂 Relevant Repositories

💻 Technical Details

  • Follow the Go-based example from the console repo:
    console/.devcontainer
  • Suggested Base Images:
    • Angular (sample-web-ui): mcr.microsoft.com/vscode/devcontainers/typescript-node:latest
    • Node.js (mps, rps, mps-router): mcr.microsoft.com/vscode/devcontainers/node:latest
  • Recommended Post-create Commands example:
    "postCreateCommand": "npm install"

Ports to Expose:

4200 for Angular (sample-web-ui)
3000, 8080 (or relevant ports) for Node.js apps

✅ Acceptance Criteria

DevContainer support is implemented for all four repositories:

  • sample-web-ui
  • mps
  • rps
  • mps-router
  • Each repository has:
    A .devcontainer/ directory with devcontainer.json and optional Dockerfile.
    Consistent setup for installing dependencies and running the app.
    Documentation in the README.md for how to use the DevContainer.
  • A Pull Request (PR) is submitted for each repository with a summary of changes.

🚀 How to Get Started

  1. Comment below to claim this issue.
  2. Fork the repos and create branches (e.g., feature/devcontainer-support).
  3. Implement DevContainer support for each repo.
  4. Submit Pull Requests (PRs) linking this issue.

📎 Additional Notes

  • Ensure consistency across all repositories for easier maintenance.
  • Test each DevContainer setup by opening the repo in VS Code and verifying:
  • Dependencies are installed successfully.
  • The application runs as expected.
  • If you encounter issues or platform-specific problems, document them in the PR description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions