Skip to content

Conversation

@idvoretskyi
Copy link
Owner

Summary

This PR optimizes the devcontainer configuration to significantly reduce startup time from approximately 4-6 minutes to 1-2 minutes.

Changes

  • Disabled package upgrades (upgradePackages: false) to avoid slow apt updates
  • Removed heavy features: kubectl-helm-minikube and sshd
  • Changed Git to os-provided version for faster builds
  • Removed unnecessary packages from Dockerfile (openssh-server, tcl)
  • Removed docker-compose.yml for simpler single-container setup
  • Streamlined postCreateCommand to minimal echo statement
  • Removed heavy VS Code extensions (ms-kubernetes-tools, blinksh.blink-fs)
  • Added setup-optional-tools.sh for on-demand tool installation
  • Added dependabot.yml for dependency management

Benefits

  • Faster Codespaces startup time (1-2 minutes vs 4-6 minutes)
  • More efficient Docker layer caching
  • Cleaner, simpler configuration
  • Better suited as a template for other repositories

Template Usage

This optimized configuration is ready to be used as a template for other repositories that need fast devcontainer startup times.

- Disabled package upgrades (upgradePackages: false)
- Removed heavy features: kubectl-helm-minikube, sshd
- Changed Git to os-provided version for faster builds
- Removed unnecessary packages from Dockerfile
- Removed docker-compose.yml for simpler single-container setup
- Streamlined postCreateCommand
- Removed heavy VS Code extensions
- Added setup-optional-tools.sh for on-demand tool installation
- Added dependabot.yml for dependency management

Estimated startup time reduced from 4-6 minutes to 1-2 minutes.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
- Remove docker-compose.yml validation steps
- Remove tcl dependency installation
- Remove kubectl and helm checks (not installed by default)
- Remove tclsh check (not installed by default)
- Keep only essential tool checks

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Add hadolint ignore comment for DL3008 warning about unpinned package versions.
For a development template, using latest versions from the base image is preferred
for flexibility and ease of maintenance.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Add fetch-depth: 0 to checkout steps to ensure Gitleaks has access
to the full commit history for scanning the commit range.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
@idvoretskyi idvoretskyi requested a review from Copilot November 3, 2025 13:59
Copy link
Contributor

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 optimizes the GitHub Codespaces devcontainer template by removing heavy dependencies and streamlining the configuration for faster startup times. The focus is on maintaining essential development tools while eliminating unnecessary features that slow down initialization.

Key changes:

  • Removed heavyweight Kubernetes tooling (kubectl, helm, minikube) and SSH server
  • Simplified devcontainer configuration by eliminating docker-compose.yml in favor of direct Dockerfile builds
  • Streamlined CI/CD pipeline by removing unnecessary validation steps and dependency installations

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Enhanced documentation with detailed features list, performance optimization notes, and expanded usage instructions
.github/workflows/ci.yml Removed docker-compose validation and tests for removed tools (tclsh, kubectl, helm)
.github/dependabot.yml Added automated dependency monitoring for GitHub Actions and Docker base images
.devcontainer/setup-optional-tools.sh Added optional tools installation script for user customization
.devcontainer/docker-compose.yml Removed docker-compose configuration to simplify build process
.devcontainer/devcontainer.json Removed Kubernetes and SSH features, streamlined VS Code extensions, simplified post-creation commands
.devcontainer/Dockerfile Removed openssh-server and tcl packages, cleaned up directory setup
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:57

  • The test checks for 'github-copilot-cli' but this tool is no longer installed. The postCreateCommand in devcontainer.json was updated to remove '@github/copilot' installation. This test will always fail and report the tool as missing.
            which github-copilot-cli || echo "github-copilot-cli is missing"

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

This tool is no longer installed as part of the optimized devcontainer.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Add Python 3.12 feature with pip and tools for a complete development experience.
Python is nearly universal for scripting, automation, and development workflows.

Changes:
- Added Python 3.12 with pip and development tools
- Added Python VS Code extensions (Python, Pylance)
- Updated postCreateCommand to verify all core tools
- Updated CI tests to verify Python installation
- Updated README with more accurate feature list and timing

This balances startup speed (2-3 min) with operational completeness.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Install Claude Code CLI via npm in postCreateCommand and include
the Claude Dev VS Code extension for AI-assisted development.

Changes:
- Added Claude Code CLI installation via npm
- Added anthropic.claude-dev VS Code extension
- Updated postCreateCommand to verify claude installation
- Updated CI tests to check for claude CLI
- Updated README to list Claude Code in features

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Since all essential tools (including Claude Code CLI) are now installed
by default in postCreateCommand, the optional tools script is redundant.

Changes:
- Removed .devcontainer/setup-optional-tools.sh
- Updated README with better customization examples
- Added examples for adding Kubernetes tools when needed

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Improvements:
- Remove redundant tcl installation step
- Fix Dockerfile path in trigger (covered by .devcontainer/**)
- Pin Trivy action to specific version (0.28.0) instead of @master
- Add severity filtering (CRITICAL,HIGH) to focus on important issues
- Improve workflow stability and reproducibility

The workflow now properly scans the optimized devcontainer configuration.

Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
Signed-off-by: Ihor Dvoretskyi <ihor@linux.com>
@idvoretskyi idvoretskyi merged commit 47c1b34 into main Nov 3, 2025
7 checks passed
@idvoretskyi idvoretskyi deleted the optimize-devcontainer-startup branch November 3, 2025 15:01
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.

2 participants