-
Notifications
You must be signed in to change notification settings - Fork 83
feat: add devcontainer for VS Code and GitHub Codespaces #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a VS Code / GitHub Codespaces devcontainer setup to make onboarding and running integration tests against a local SQL Server container easier and more consistent.
Changes:
- Introduces a full
.devcontainer/configuration (Dockerfile, docker-compose, devcontainer.json, post-create provisioning, and SQL bootstrap script). - Documents devcontainer usage in both the root README and a dedicated
.devcontainer/README.md. - Adds a root
.dockerignoreto reduce Docker build context noise.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds “Open in Dev Containers” badge and a Development section with quickstart/manual setup. |
| .dockerignore | Defines ignore rules for Docker builds from the repo root. |
| .devcontainer/Dockerfile | Dev image with Go toolchain + common Go dev tools and dependencies. |
| .devcontainer/docker-compose.yml | Orchestrates devcontainer + SQL Server sidecar with healthcheck. |
| .devcontainer/devcontainer.json | VS Code devcontainer configuration, extensions, forwarded ports, env vars, post-create command. |
| .devcontainer/post-create.sh | Post-create setup: downloads deps, builds sqlcmd, validates build, waits for DB, runs setup.sql, adds aliases. |
| .devcontainer/mssql/setup.sql | Creates a SqlCmdTest database and sample objects for quick testing. |
| .devcontainer/README.md | Detailed documentation for devcontainer usage, troubleshooting, and customization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
4b40af5 to
9ea062d
Compare
- Go 1.24 with gopls, delve, staticcheck, golangci-lint - SQL Server 2025 (Developer Edition) with health checks - go-sqlcmd built and installed from source (dogfooding!) - Pre-configured VS Code extensions (Go, MSSQL, Copilot, etc.) - Environment variables pre-set for testing - Add Development section to README with quick start guide - Add 'Open in Dev Containers' badge to README
cd49443 to
0e4fea5
Compare
Summary
This PR adds a development container setup for easier onboarding and consistent development environments.
What's Included
Development Environment
SQL Server 2025
SqlCmdTest) created on startupVS Code Extensions (pre-installed)
Features
sqlcmd create mssql, etc.)Environment Variables
Pre-configured so tests run immediately:
SQLCMDSERVER=localhostSQLCMDUSER=saSQLCMDPASSWORD=SqlCmd@2025!SQLCMDDATABASE=masterHelpful Aliases
gtestgbuildginstallglintsqltest-dbUsage
VS Code
GitHub Codespaces
gtestto verify everything worksRelation to go-mssqldb
This follows the same pattern as go-mssqldb PR #317, making it easy for contributors to work on both projects with consistent environments.