What problem does it solve?
This skill provides canonical devcontainer.json patterns for projects using mise, enabling repeatable, secure, and predictable container-based development environments across multi-folder workspaces.
Core Features & Use Cases
- OnCreate vs PostCreate: document how to place tool installation in onCreateCommand and source-dependent setup in postCreateCommand to optimize prebuild caching.
- Environment & Trust: configure containerEnv, remoteEnv, and MISE_TRUSTED_CONFIG_PATHS to enforce security and reliability.
- Mounts & User: specify SSH key forwarding and respect a dedicated remoteUser for consistent container behavior.
- Multi-Workspace Patterns: guide organizing multiple repos under /workspaces and trusting their config.
Quick Start
Draft and review a complete devcontainer.json pattern that integrates mise with onCreateCommand, postCreateCommand, mounts, environment shims, and trust rules.
{
"name": "myproject",
"image": "mcr.microsoft.com/devcontainers/base:debian",
"onCreateCommand": "curl https://mise.run | sh && echo 'eval \"$(/home/vscode/.local/bin/mise activate bash)\"' >> /home/vscode/.bashrc && /home/vscode/.local/bin/mise trust && /home/vscode/.local/bin/mise install",
"postCreateCommand": "mise exec -- npm ci || true",
"containerEnv": {
"MISE_TRUSTED_CONFIG_PATHS": "/workspaces"
},
"remoteEnv": {
"PATH": "/home/vscode/.local/share/mise/shims:${containerEnv:PATH}"
},
"mounts": [
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached,readonly"
],
"customizations": {
"vscode": {
"extensions": [
"hverlin.mise-vscode"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash"
}
}
},
"remoteUser": "vscode",
"waitFor": "onCreateCommand"
}