microsoft / microsoft/aspire

DevContainer can't be used on macOS

Open
#16,354 0 comments 0 reactions 0 assignees View on GitHub
area-engineering-systems
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 12h
Merged PRs (30d)
201

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

I tried to get https://github.com/microsoft/aspire/pull/14254 through, but the repository's DevContainers just don't work on macOS.

### Expected Behavior

DevContainers being able to start and run the repository with latest VS Code.

### Steps To Reproduce

1. Clone the repository on `main`
2. Start the folder in VS Code
3. Build the DevContainers
4. See it fail

### Exceptions (if any)

```
[2026-04-21T06:58:58.915Z] Stop (1 ms): Run in container: cat '/tmp/devcontainers-fab3de7f-06fb-4a1c-862b-0d779dd34aee1776754476846/env-loginInteractiveShell.json'
[2026-04-21T06:58:58.915Z] Start: Run in container: /bin/sh -c dotnet restore
[2026-04-21T06:58:59.062Z] A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/workspaces/aspire/.dotnet/shared/Microsoft.NETCore.App/10.0.5'.
[2026-04-21T06:58:59.182Z]
What's next:
Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug 0a780387687938185d38796158267408401531cfa680e80b898483e56e3be3ed
Learn more at https://docs.docker.com/go/debug-cli/
[2026-04-21T06:58:59.183Z] Stop (268 ms): Run in container: /bin/sh -c dotnet restore
[2026-04-21T06:58:59.184Z] onCreateCommand from devcontainer.json failed with exit code 131. Skipping any further user-provided commands.
[2026-04-21T06:58:59.185Z] Error: Command failed: /bin/sh -c dotnet restore
[2026-04-21T06:58:59.185Z] at E (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:233:157)
[2026-04-21T06:58:59.185Z] at async Promise.allSettled (index 0)
[2026-04-21T06:58:59.185Z] at async Jq (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:235:119)
[2026-04-21T06:58:59.185Z] at async Hd (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:224:4668)
[2026-04-21T06:58:59.185Z] at async xd (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:224:4013)
[2026-04-21T06:58:59.185Z] at async Kd (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:224:3020)
[2026-04-21T06:58:59.185Z] at async PZ (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:667:2823)
[2026-04-21T06:58:59.185Z] at async YZ (/Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:666:8941)
[2026-04-21T06:58:59.185Z] at async /Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js:483:1917
[2026-04-21T06:58:59.190Z] Stop (600 ms): Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js run-user-commands --user-data-folder /Users/dejhbk0l/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-fab3de7f-06fb-4a1c-862b-0d779dd34aee1776754476846 --workspace-folder /Users/dejhbk0l/GitRepos/liv3/aspire --id-label devcontainer.local_folder=/Users/dejhbk0l/GitRepos/liv3/aspire --id-label devcontainer.config_file=/Users/dejhbk0l/GitRepos/liv3/aspire/.devcontainer/devcontainer.json --container-id 0a780387687938185d38796158267408401531cfa680e80b898483e56e3be3ed --log-level debug --log-format json --config /Users/dejhbk0l/GitRepos/liv3/aspire/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --skip-non-blocking-commands true --prebuild false --stop-for-personalization true --remote-env REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-f434040b-ecc6-46e6-88a3-8e7aee2a6d12.sock --remote-env SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-f434040b-ecc6-46e6-88a3-8e7aee2a6d12.sock --remote-env REMOTE_CONTAINERS=true --mount-workspace-git-root --terminal-columns 311 --terminal-rows 16 --dotfiles-target-path ~/dotfiles
[2026-04-21T06:58:59.190Z] Exit code 1
[2026-04-21T06:58:59.192Z] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/dejhbk0l/.vscode/extensions/ms-vscode-remote.remote-containers-0.454.0/dist/spec-node/devContainersSpecCLI.js run-user-commands --user-data-folder /Users/dejhbk0l/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-fab3de7f-06fb-4a1c-862b-0d779dd34aee1776754476846 --workspace-folder /Users/dejhbk0l/GitRepos/liv3/aspire --id-label devcontainer.local_folder=/Users/dejhbk0l/GitRepos/liv3/aspire --id-label devcontainer.config_file=/Users/dejhbk0l/GitRepos/liv3/aspire/.devcontainer/devcontainer.json --container-id 0a780387687938185d38796158267408401531cfa680e80b898483e56e3be3ed --log-level debug --log-format json --config /Users/dejhbk0l/GitRepos/liv3/aspire/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --skip-non-blocking-commands true --prebuild false --stop-for-personalization true --remote-env REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-f434040b-ecc6-46e6-88a3-8e7aee2a6d12.sock --remote-env SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-f434040b-ecc6-46e6-88a3-8e7aee2a6d12.sock --remote-env REMOTE_CONTAINERS=true --mount-workspace-git-root --terminal-columns 311 --terminal-rows 16 --dotfiles-target-path ~/dotfiles
[2026-04-21T06:58:59.192Z] Exit code 1
```

### Aspire doctor output

_No response_

### Anything else?

VS Code Version: 1.116.0
OS: macOS 26.4.1 Tahoe ARM64

Contributor guide

Open the contributing guide

Research direction

Start with .devcontainer/devcontainer.json and reproduce the onCreateCommand failure by opening the repository in VS Code on macOS ARM64. Trace the /bin/sh -c dotnet restore step and the missing libhostpolicy.so error; done means the DevContainer starts successfully and restore completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, docker, vscode
Domain
developer-experience, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.