-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
Description
🔹 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:
sample-web-ui(Angular)mps(Node.js)rps(Node.js)mps-router(Node.js)
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.jsonfile specifying:- Base image suitable for the tech stack (Node.js for
mps,rps,mps-router; Angular forsample-web-ui). - Pre-installed extensions relevant to the stack (e.g., Angular, TypeScript, Node.js, Docker).
- Post-create commands to install dependencies.
- Base image suitable for the tech stack (Node.js for
- 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
consolerepo:
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
- Angular (
- 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
- Comment below to claim this issue.
- Fork the repos and create branches (e.g., feature/devcontainer-support).
- Implement DevContainer support for each repo.
- 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.