Outside container
This is a feature request, and might be definitely out of the main scope of the project.
It would be interesting for me, to be able to set up a local machine with the same settings of a devcontainer. I know it is not the same thing, and there are other tools available to manage machine installations, but the consideration stems from Codespace and similar environments: if I can give people an environment to use remotely, I'd like to make it easy for them to set up the same environment locally, if possible.
Essentially, devcontainer.json is giving a well-defined way to configure a remote environment, but sometimes you also want to work locally, and while working locally you might want to have the same environment of a specific remote, but you definitely don't want to run in a container most of your time (though it's of course an option).
However, it might be a silly idea, so I'm open to considerations.
Couldn't you use the Dev Containers extension for VS Code? That allows you to run dev containers on you local machine.
I'm not using VS code, and I'd like to work also outside, if possible.
Let's say, I'd want to be free to run commands in whatever terminal, on a generic machine, not inside a container. But the installation should have been automated, running the content of devcontainer.json.
The various features implemented have all an install.sh by design, so I should be able to run them on any machine with a shell (let's say even a Linux machine), even if I'm not inside a container.
The feature install scripts actually expect to be run on Linux.
FYI: You can start a dev container locally without VS Code by using the dev container CLI directly (VS Code and Codespaces both use the same CLI): https://www.npmjs.com/package/@devcontainers/cli
The feature install scripts actually expect to be run on Linux.
Indeed, this one I acknowledged also above.
FYI: You can start a dev container locally without VS Code by using the dev container CLI directly
And this is why I opened the PR on this repo ^^
But, from what I understood from the README, even the CLI will run all the install.sh inside a container. That is fine, and already useful even outside VS code.
The PR instead was intended to request to be able to use the CLI to run all the install scripts (install.sh), identified by the devcontainer.json, on the native system. Of course it is not ideal, because being a Node CLI you need to install at least Node to get started, so it is definitely not a "fresh environment" like a container would be.
Of course, also this problem might be solved by a stand-alone binary, reimplementing the logic of https://www.npmjs.com/package/@devcontainers/cli in a compiled application, and distributing binaries. But to be honest, personally I don't care so much, and I can accept to install on a system on which Node has been already installed (i.e. to give up on managing Node function by devcontainers.json) :)
We are focusing on containers at the moment, so I'm closing this as out of scope. Thanks for discussing this.