I have two suggestions based on my use-case:
postCreateCommand, it would be nice to have a preCreateCommand to run commands before the container is created.devcontainer.json and allow the user to pick which one to run. Similar to the request in #2067 but I think it should more generic instead of OS-specific only.If I missed something and there are solutions to these problems (or workarounds) please share.
preCreateCommand is tracked with #1045. Let's track the multiple configs here. (It's best to file individual feature requests in separate issues.)
Supporting multiple devcontainers would be HUGE. When multiple definitions are found, selecting re-open in container should then prompt you to pick one of the container definitions. This would help with developing/testing/debugging code on different versions of linux (not all products are deployed in docker). If a docker.host field can also be added to the config, it would also be great for developing code for embedded platforms like a tegra. The code can be developed on a desktop, and then you can switch to the aarch64 container and run it in that container over SSH on the actual hardware. Currently to do that you need to replace your devcontainer and enter the IP in settings.json.
A frequent use case for multiple containers Is generally GPU/CPU separate images.
Thanks for opening this thread! It appears to be along the lines of https://github.com/microsoft/vscode-remote-release/issues/1165. While 1165 focuses on different versions of Python in its explanation, I think the overarching point still stands: being able to choose a certain container config from a set of possible configurations when opening your code in a container.
I think it'd make sense to migrate to that thread to consolidate our discussion- if that grouping sounds alright with folks in this thread too, I'll go ahead and close this issue to avoid dupes.
@bamurtaugh Ok can you summarize this thread there?
@bhack Yes, I'm happy to summarize this thread in #1165! I'll do so now and then close out this issue. Please let me know if you have any other feedback or questions, and also feel free to reply in that thread as well.
Most helpful comment
Supporting multiple devcontainers would be HUGE. When multiple definitions are found, selecting re-open in container should then prompt you to pick one of the container definitions. This would help with developing/testing/debugging code on different versions of linux (not all products are deployed in docker). If a docker.host field can also be added to the config, it would also be great for developing code for embedded platforms like a tegra. The code can be developed on a desktop, and then you can switch to the aarch64 container and run it in that container over SSH on the actual hardware. Currently to do that you need to replace your devcontainer and enter the IP in settings.json.