Dev containers and codespaces would be the current answer to this question.
Dev containers work with VS Code and allow for developing inside a docker container. Commit the .devcontainer folder with config settings to the student’s assignment repo, When the student opens the repo in VS Code, VS Code will automatically suggest re-opening the repo in the dev container, using the settings in the .devcontainer folder. Downside is students need to have docker installed.
Codespaces allow dev containers to be run in the cloud, and can be accessed via a web browser. Students are presented with a browser based version of VS Code that runs and looks more or less the same as the desktop version. Codespaces can be launched directly from the repo on GitHub (it’s an option in the <>code button drop down.) You can give students a fully configured development environment and the only thing the student needs is a web browser and an internet connection. Unfortunately, codespaces is out of beta and is no longer free. **It would be great if GitHub gave some educational discount for codespace, because it does solve a lot of problems.
I tried running codespaces with an introduction to SQL class back in March, but I couldn’t get the students signed up to the beta. You can see the .decontainer settings I used here: com236-kv-lab-4-markpatterson27/.devcontainer at main · SERC-COM236-Labs/com236-kv-lab-4-markpatterson27 · GitHub When run in codespaces, it would provide a dev environment with SQL Server running, so students could test their SQL statements before committing them.
Gitpod seem to be trying to provide a self-hosted option for dev containers - GitHub - gitpod-io/openvscode-server: Run upstream VS Code on a remote machine with access through a modern web browser from any device, anywhere. It’s on my list of things to look at, but I haven’t looked at it yet.
(As an aside, does everyone know that the browser based version of VS Code is now integrated into GitHub. Press period/dot ‘.’ when viewing a repo to open the repo in VS Code, inside the browser! It does feel a lot like magic. There’s no code execution, but you can install extensions, including language servers for syntax highlighting.)