| title | Mounted Directory Installation | |||||
|---|---|---|---|---|---|---|
| description | Advanced devcontainer setup mounting HVE-Core from host filesystem | |||||
| author | Microsoft | |||||
| ms.date | 2025-12-03 | |||||
| ms.topic | how-to | |||||
| keywords |
|
|||||
| estimated_reading_time | 8 |
Mounted Directory installation shares a single HVE-Core clone across multiple devcontainer projects by mounting a peer directory from the host filesystem. This is an advanced method requiring container rebuilds.
✅ Use this when:
- You have multiple devcontainer projects needing HVE-Core
- You want a single shared installation (one update applies everywhere)
- You're comfortable with devcontainer configuration
- You're using local devcontainers only (not Codespaces)
❌ Consider alternatives when:
- You use Codespaces → GitHub Codespaces (mounts don't work)
- You want simpler setup → Git-Ignored Folder
- Your team needs version control → Submodule
- You need paths that work everywhere → Multi-Root Workspace
This method does NOT work in GitHub Codespaces. Codespaces doesn't support ${localWorkspaceFolder} or bind mounts to host filesystem.
Requires container rebuild. After adding the mount, you must rebuild the devcontainer before HVE-Core becomes accessible.
HVE-Core is cloned on your host machine as a sibling to your project. The devcontainer mounts this directory into the container at /workspaces/hve-core.
Host File System:
projects/
├── my-project/ # Your project (workspace)
│ └── .devcontainer/
│ └── devcontainer.json # Contains mount configuration
│
└── hve-core/ # Peer directory on HOST
└── .github/
├── agents/
├── prompts/
└── instructions/
Inside Container (after rebuild):
/workspaces/
├── my-project/ # Mounted workspace
└── hve-core/ # Mounted peer directory
This method requires a multi-phase workflow:
┌─────────────────────────────────────────────────────────────┐
│ Phase 1: Clone HVE-Core on HOST │
│ ↓ │
│ Phase 2: Add mount to devcontainer.json │
│ ↓ │
│ Phase 3: Rebuild container (1-3 minutes) │
│ ↓ │
│ Phase 4: Configure VS Code settings │
│ ↓ │
│ Phase 5: Validate installation │
└─────────────────────────────────────────────────────────────┘
Use the hve-core-installer agent:
- Open GitHub Copilot Chat (
Ctrl+Alt+I) - Select
hve-core-installerfrom the agent picker - Say: "Install HVE-Core using mounted directory"
- Follow the multi-phase guided setup
Important: Clone on your host machine, not inside the container.
Open a terminal on your host (not in VS Code's container terminal):
# Navigate to parent of your project
cd /path/to/projects
# Clone HVE-Core as a sibling
git clone https://github.com/microsoft/hve-core.gitVerify structure:
projects/
├── my-project/
└── hve-core/ # ← Must exist on HOST before rebuild
Update .devcontainer/devcontainer.json:
Alternative object format:
{
"mounts": [
{
"type": "bind",
"source": "${localWorkspaceFolder}/../hve-core",
"target": "/workspaces/hve-core"
}
]
}- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Type "Dev Containers: Rebuild Container"
- Press Enter and wait for rebuild (1-3 minutes)
What happens during rebuild:
- Current container stops
- New container builds with mount configuration
- Extensions reinstall
- Lifecycle scripts re-run
After rebuild, update .vscode/settings.json:
{
"chat.modeFilesLocations": { "/workspaces/hve-core/.github/agents": true },
"chat.promptFilesLocations": { "/workspaces/hve-core/.github/prompts": true },
"chat.instructionsFilesLocations": { "/workspaces/hve-core/.github/instructions": true }
}Or add to devcontainer.json (recommended for team sharing):
{
"customizations": {
"vscode": {
"settings": {
"chat.modeFilesLocations": { "/workspaces/hve-core/.github/agents": true },
"chat.promptFilesLocations": { "/workspaces/hve-core/.github/prompts": true },
"chat.instructionsFilesLocations": { "/workspaces/hve-core/.github/instructions": true }
}
}
}
}- Open GitHub Copilot Chat (
Ctrl+Alt+I) - Click the agent picker dropdown
- Verify HVE-Core agents appear (task-planner, task-researcher, prompt-builder)
Verify mount from container terminal:
ls /workspaces/hve-core/.github/agents{
"name": "My Project with Mounted HVE-Core",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"mounts": [
"source=${localWorkspaceFolder}/../hve-core,target=/workspaces/hve-core,type=bind,readonly=true,consistency=cached"
],
"customizations": {
"vscode": {
"settings": {
"chat.modeFilesLocations": { "/workspaces/hve-core/.github/agents": true },
"chat.promptFilesLocations": { "/workspaces/hve-core/.github/prompts": true },
"chat.instructionsFilesLocations": { "/workspaces/hve-core/.github/instructions": true }
}
}
}
}Update on your host machine:
cd /path/to/projects/hve-core
git pullChanges are immediately available in all containers using the mount. No rebuild required for content updates.
Cause: HVE-Core wasn't cloned on the host, or was cloned in the wrong location.
Fix:
- Exit the container
- Clone HVE-Core on your host machine (see Phase 1)
- Verify the path matches the mount source
- Rebuild the container
Check from host terminal:
# On host, not in container
ls /path/to/projects/hve-core/.githubCause: Mount source path doesn't exist.
Fix:
- Check
devcontainer.jsonmount path - Ensure HVE-Core exists at
${localWorkspaceFolder}/../hve-core - Remove the mount temporarily to start the container
- Clone HVE-Core, then add mount back and rebuild
Check mount is working:
# Inside container
ls /workspaces/hve-core/.github/agentsCheck settings paths match:
Settings must use absolute container paths (/workspaces/hve-core/...), not relative paths.
This is expected. Codespaces doesn't support ${localWorkspaceFolder} or host bind mounts.
Solution: Use postCreateCommand for Codespaces, or Multi-Root Workspace for dual-environment support.
| Aspect | Status |
|---|---|
| Devcontainers | ✅ Full support |
| Codespaces | ❌ Not supported (no host access) |
| Team sharing | |
| Portable paths | |
| Version pinning | |
| Shared installation | ✅ One clone serves all projects |
| Setup complexity | |
| Update process | ✅ Just git pull on host |
- Your First Workflow - Try HVE-Core with a real task
- Multi-Root Workspace - Simpler portable solution
- postCreateCommand - If you also need Codespaces support
🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.
{ // ... existing configuration ... "mounts": [ "source=${localWorkspaceFolder}/../hve-core,target=/workspaces/hve-core,type=bind,readonly=true,consistency=cached" ] }