Devcontainers in monorepo aren't being identified

We have a monorepo with devcontainer config which looks like below

It works as expected (prompts us asking for which devcontainer) when we use ms-vscode-remote.remote-containers

But when we use anysphere.remote-containers, it fails with an errors like

ailed to connect to the remote extension host server (Error: Invalid DevContainerDestination JSON: {"hostPath":"<path>","localDocker":false,"settings":{"context":"desktop-linux"},"configFile":{"$mid":1,"fsPath":"<path>/.devcontainer/mlai/devcontainer.json","path":"<path>/.devcontainer/mlai/devcontainer.json","scheme":"file"}})

or

No devcontainer.json files found. Please define the devcontainer in '.devcontainer/devcontainer.json'

Thanks for sharing this request – let me see about adding a picker like that in when there are multiple dev container files to pick from.

Link to spec: Development Container Specification

1 Like

I believe the first error (Invalid DevContainerDestination...) happens when opening a window from the recent windows list that was previously configured via the VSCode dev containers extension. Our serialization format (for the history) is slightly different, so it’ll only work for folders that were opened originally through the Anysphere extension.

Re: the 2nd issue with the devcontainer.json file being in an alternative location, version 1.0.4 of our extension should show a picker when running the “Reopen in Container” command. Could you upgrade to that version and give it another go? Thanks so much for bringing this up.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.