Skip to content

feat: Add devcontainer and vscode config#611

Open
nbmaiti wants to merge 2 commits into
v2from
enable_multi_lang_devcontainer
Open

feat: Add devcontainer and vscode config#611
nbmaiti wants to merge 2 commits into
v2from
enable_multi_lang_devcontainer

Conversation

@nbmaiti

@nbmaiti nbmaiti commented Jun 15, 2026

Copy link
Copy Markdown
-> Add Devcontainer to cloud deployment
-> devcontainer docker from docker to use host system
-> Add vscode debug configs
-> Add debug extenstions
-> unique jwt key generations

@nbmaiti nbmaiti force-pushed the enable_multi_lang_devcontainer branch 2 times, most recently from cd0efa5 to c1369d2 Compare June 15, 2026 08:40
@nbmaiti nbmaiti changed the title feat : Add devcontainer and vscode config feat: Add devcontainer and vscode config Jun 15, 2026
@nbmaiti nbmaiti requested a review from Copilot June 15, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@nbmaiti

nbmaiti commented Jun 15, 2026

Copy link
Copy Markdown
Author

Tested on corporate proxy and non-proxied environment

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 11 comments.

Comment thread .devcontainer/pre-create.sh
Comment thread .devcontainer/pre-create.sh Outdated
Comment thread .devcontainer/pre-create.sh Outdated
Comment thread .devcontainer/pre-create.sh Outdated
Comment thread .devcontainer/devcontainer.json Outdated
Comment thread .vscode/tasks.json
Comment thread .vscode/tasks.json
Comment thread .vscode/tasks.json Outdated
Comment thread .devcontainer/Dockerfile Outdated
Comment thread Readme.md Outdated
@nbmaiti nbmaiti removed the request for review from sudhir-intc June 15, 2026 17:52
nbmaiti added 2 commits June 17, 2026 00:36
Added devcontainter support for all builds, debug support
Signed-off-by: Nabendu Maiti <nabendu.bikash.maiti@intel.com>
@nbmaiti nbmaiti force-pushed the enable_multi_lang_devcontainer branch from c70d2e6 to cbdfe3e Compare June 16, 2026 19:06
@nbmaiti nbmaiti requested a review from Copilot July 2, 2026 03:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.

@@ -0,0 +1,170 @@
#!/bin/bash

# This script runs on the host machine BEFORE the container is created.
Comment on lines +47 to +54
# Allow override via env; fall back to hostname -I (Linux) then localhost for cross-platform support
if [ -n "${MPS_COMMON_NAME:-}" ]; then
DEFAULT_MPS_COMMON_NAME="$MPS_COMMON_NAME"
elif command -v hostname >/dev/null 2>&1 && hostname -I >/dev/null 2>&1; then
DEFAULT_MPS_COMMON_NAME=$(hostname -I | awk '{print $1}')
else
DEFAULT_MPS_COMMON_NAME="host.docker.internal"
fi
Comment on lines +17 to +26
validate_repository() {
if [ -f "$README_FILE" ] && grep -q "Device Management Toolkit (formerly known as Open AMT Cloud Toolkit)" "$README_FILE"; then
REPO_TYPE="DMT"
echo "✓ Detected: Device Management Toolkit repository"
return 0
fi

echo "✗ Error: Unrecognized repository. This script must be run from the Device Management Toolkit repository."
exit 1
}
Comment thread DEVELOPER_DEVCONTAINER.md
Comment on lines +117 to +120
VSCode->>Host: initializeCommand → pre-create.sh
Host->>Host: Validate repo (Readme.md check)
Host->>Host: Generate JWT_SECRET / JWT_ISSUER / VAULT_TOKEN
Host->>Host: Write .env, patch kong.yaml / cypress.config.ts / docker-compose.yml
Comment thread DEVELOPER_DEVCONTAINER.md
| `.devcontainer/devcontainer.json` | Container definition, features, port forwarding, extension list |
| `.devcontainer/Dockerfile` | Ubuntu 22.04 + proxy env + sudoers `env_keep` |
| `.devcontainer/devcontainer-lock.json` | Pinned feature digests for reproducible builds |
| `.devcontainer/pre-create.sh` | **Host** hook: validates repo, generates secrets, writes `.env`, patches `kong.yaml` / `cypress.config.ts` / `docker-compose.yml` |
Comment on lines +5 to +8
for var in HTTP_PROXY HTTPS_PROXY NO_PROXY http_proxy https_proxy no_proxy; do
eval v="\${$var}"
if [ -z "$v" ]; then unset $var; fi
done
Comment on lines +11 to +17
strip_trailing_slash() {
local url="$1"
# Remove all trailing / or \
url="${url%%*(/|\\)}"
# Fallback for Bash < 4.0 (no extglob): use sed
echo "$url" | sed 's%[\\/]*$%%'
}
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.

2 participants