GitHub Codespaces: Coding in the Cloud

GitHub Codespaces provides a full VS Code environment in the browser, backed by a Docker container. I’ve standardized my team’s dev environment using it.

devcontainer.json

The magic is in the .devcontainer folder.

{
  "name": "C# Environment",
  "image": "mcr.microsoft.com/dotnet/sdk:5.0",
  "extensions": [
    "ms-dotnettools.csharp"
  ],
  "forwardPorts": [5000, 5001]
}

When a new developer joins, they click “Open in Codespace” and get a perfectly configured environment instantly. No “it works on my machine” issues.


Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.