-
Notifications
You must be signed in to change notification settings - Fork 0
Optimize devcontainer for faster startup #9
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
Conversation
- 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>
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
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>
Summary
This PR optimizes the devcontainer configuration to significantly reduce startup time from approximately 4-6 minutes to 1-2 minutes.
Changes
upgradePackages: false) to avoid slow apt updateskubectl-helm-minikubeandsshdos-providedversion for faster buildsdocker-compose.ymlfor simpler single-container setuppostCreateCommandto minimal echo statementsetup-optional-tools.shfor on-demand tool installationdependabot.ymlfor dependency managementBenefits
Template Usage
This optimized configuration is ready to be used as a template for other repositories that need fast devcontainer startup times.