Skip to content

Add VS Code Dev Container configuration#35

Merged
jcleigh merged 2 commits intomainfrom
copilot/add-devcontainer-configuration
Jan 12, 2026
Merged

Add VS Code Dev Container configuration#35
jcleigh merged 2 commits intomainfrom
copilot/add-devcontainer-configuration

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Adds .devcontainer/devcontainer.json to enable consistent local development environments using VS Code Dev Containers.

Configuration

  • Base image: mcr.microsoft.com/devcontainers/go:1-1.25-bookworm (matches go.mod requirement)
  • Features: Git, GitHub CLI
  • Extensions: Go, Makefile tools, EditorConfig, YAML, Copilot
  • Go settings:
    • Language server enabled
    • golangci-lint with --fast flag
    • Test flags: -v -race (matches CI)
    • Format on save with Go formatter
  • Post-create: Downloads modules and installs golangci-lint
  • Environment: GOPROXY=https://proxy.golang.org,direct, remote user vscode

Developers can now open this repo in a Dev Container to get a pre-configured environment that matches the project's CI/CD pipeline.

Original prompt

Summary

Add a .devcontainer configuration to enable consistent local development using VS Code Dev Containers.

Requirements

Create a .devcontainer/devcontainer.json file with the following configuration:

Base Image

  • Use mcr.microsoft.com/devcontainers/go:1-1.25-bookworm to match the Go 1.25 requirement in go.mod

Features to Include

  • Git (ghcr.io/devcontainers/features/git:1)
  • GitHub CLI (ghcr.io/devcontainers/features/github-cli:1)

VS Code Extensions

  • golang.go - Go language support
  • ms-vscode.makefile-tools - Makefile support (project uses Make)
  • EditorConfig.EditorConfig - Editor configuration
  • redhat.vscode-yaml - YAML support (for .foundagent.yaml files)
  • GitHub.copilot - GitHub Copilot

VS Code Settings

  • Enable Go language server (go.useLanguageServer: true)
  • Configure golangci-lint as the linter (go.lintTool: golangci-lint)
  • Set lint flags to ["--fast"]
  • Set test flags to ["-v", "-race"] to match CI configuration
  • Enable format on save
  • Set Go extension as default formatter for Go files

Post-Create Command

Run the following after container creation:

go mod download && go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

Container Configuration

  • Set remoteUser to vscode
  • Set GOPROXY environment variable to https://proxy.golang.org,direct

Acceptance Criteria

  • .devcontainer/devcontainer.json file is created with all the above configuration
  • Container can be built and opened successfully in VS Code
  • make build, make test, and make check commands work inside the container
  • golangci-lint is available and functional

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jcleigh <12815554+jcleigh@users.noreply.github.com>
Copilot AI changed the title [WIP] Add .devcontainer configuration for local development Add VS Code Dev Container configuration Jan 12, 2026
Copilot AI requested a review from jcleigh January 12, 2026 02:46
@jcleigh jcleigh marked this pull request as ready for review January 12, 2026 02:54
Copilot AI review requested due to automatic review settings January 12, 2026 02:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds VS Code Dev Container configuration to enable consistent local development environments that match the project's CI/CD pipeline.

Changes:

  • Adds .devcontainer/devcontainer.json with Go 1.25 base image matching the project's requirements
  • Configures VS Code extensions and settings for Go development with golangci-lint, format-on-save, and test flags matching CI
  • Sets up automatic dependency download and golangci-lint installation on container creation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jcleigh jcleigh merged commit 8553890 into main Jan 12, 2026
11 checks passed
@jcleigh jcleigh deleted the copilot/add-devcontainer-configuration branch January 12, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants