A devcontainer configuration that just works. It uses Ubuntu 24.04 and uses the ubuntu user inside the container. The ubuntu user will have the same userid as the host user (in most cases) so the file permissions don't get warped.
The devcontainer.json and Dockerfile files need to go into a .devcontainer/ folder, like so:
.devcontainer/Dockerfile
.devcontainer/devcontainer.json