I have a few devcontainer configurations that I use with both the Visual Studio Code Remote Container extensions and GitHub Codespaces to teach classroom topics.
I have a sample here on GitHub: https://github.com/seesharprun/how-to-sql-query
I want to figure out how to open a file and the Markdown preview on launch when someone opens this project in a devcontainer (either using Code or Codespaces).
VSCode.dev seems to do this already: https://open.vscode.dev/seesharprun/how-to-sql-query
This would allow me to open something like a default *.cs file or the preview of a readme.md file with instructions on how to complete the "lab" for students.
I have looked at https://containers.dev/ to learn more about the JSON schema definition. I have seen things like the postCreateCommand
, postAttachCommand
and the postStartCommand
. I tried using the command code readme.md --reuse-window
with postAttachCommand
, but that didn't seem to work. I also looked at tasks
but couldn't find anything to help there either.