diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..244f3ac3f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,21 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/go +{ + "name": "Node", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:22-bullseye", + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [ + 8080, + 8081, + 8082 + ], + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm install" + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/README.md b/README.md index 366cd2558..ec62bcc17 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,17 @@ We leverage [Postman](https://www.postman.com/) and Docker for executing RESTful
+## Using devcontainer + +If you want debug in vscode devcontainer, try to open the project with devcontainer (Make sure you install the extension of **Dev Containers**) + +- Step1: Press **Ctrl + Shift+ P** in vscode; +- Step2: Type **Dev Containers: Reopen in Container**; +- Step3: Click the item which appear in column; +- Step4: Open a terminal, build and run app with command; + +
+ ## Additional Resources - For detailed documentation and Getting Started, [visit the docs site](https://device-management-toolkit.github.io/docs).