Harness the power of VS Code Dev Containers on Windows! A safe, isolated Node.js/TypeScript environment for GitHub Copilot experiments.
π― For Windows Developers: Experience the magic of containerized development without leaving your familiar Windows + VS Code workflow. Edit files on Windows, run code in Linux containers - get the best of both worlds!
The Problem: Installing development tools directly on Windows can be messy, version conflicts arise, and experimental tools can clutter your system.
The Solution: Dev Containers let you run a complete Linux development environment inside Docker while keeping your familiar Windows editing experience in VS Code.
- β Experiment safely - Try new tools without cluttering Windows
- β Avoid "dependency hell" - Each project gets its own isolated environment
- β Keep familiar workflow - Edit in VS Code on Windows, run in Linux container
- β Share identical setups - No more "works on my machine" problems
- β Use GitHub Copilot effectively - Pre-configured AI development environmentogeTech Experimental Dev Environment
A safe, isolated development environment for GitHub Copilot experiments using VS Code Dev Containers.
π― Purpose: Containerized Node.js/TypeScript environment that protects your host machine while providing a consistent, AI-enhanced development experience. Perfect for experimenting with new tools, learning, and rapid prototyping.
- Docker Desktop for Windows with WSL2 backend
- VS Code (the editor you already love!)
- Dev Containers Extension (Microsoft's official extension)
-
Clone with PowerShell/Command Prompt:
git clone https://github.com/BurtHarris/dogeTech.git cd dogeTech code .
-
Let VS Code do the magic:
- VS Code detects the Dev Container config β "Reopen in Container"
- Click it and watch Docker + VS Code create your Linux development environment!
- OR manually:
Ctrl+Shift+Pβ "Dev Containers: Reopen in Container"
-
Enjoy the best of both worlds:
- Edit files: Normal VS Code experience on Windows
- Run commands: PowerShell terminal inside Ubuntu Linux container
- Debug & IntelliSense: Works seamlessly across the boundary
- GitHub Copilot: Pre-configured and ready for AI-assisted coding
- β Safe Isolation: Linux container protects your Windows system
- β Familiar VS Code: Same editor, same extensions, same shortcuts
- β PowerShell in Linux: Windows-friendly terminal inside Ubuntu container
- β No Windows PATH pollution: Tools stay in container, Windows stays clean
- β GitHub Copilot: Pre-configured for AI-enhanced development
- β Hot Reload: Edit on Windows, see changes instantly in container
- β Cross-platform consistency: Same Linux environment on any Windows machine
- β Easy cleanup: Delete container to remove all traces
β Installing Node.js, Python, databases clutters system PATH
β Version conflicts between projects (Node 14 vs Node 20)
β Experimental tools leave traces even after uninstall
β "Works on my machine" - different setups across team
β Fear of breaking system when trying new tools
β
Each project gets isolated Linux environment
β
Switch between Node versions instantly (different containers)
β
Experiment fearlessly - delete container to reset completely
β
Identical team environments - share container configuration
β
Keep Windows clean - all dev tools contained
# Want to try Python data science? No problem!
# Add to Dockerfile: RUN pip install pandas jupyter tensorflow
# Rebuild container - Python tools available instantly
# Delete container later - zero traces on WindowsResult: Professional Linux-based development workflow while staying in your comfortable Windows environment!
- Push this repository to GitHub
- Share the repository URL
- She follows APPRENTICE_SETUP.md
- Identical environment automatically created
# You make improvements:
git add . && git commit -m "Added Python support" && git push
# She gets updates:
git pull
# In VS Code: Ctrl+Shift+P β "Dev Containers: Rebuild Container"Result: Both of you have identical experimental environments that stay in sync!
# Install dependencies (run once)
npm install
# Setup GitHub secrets (secure token storage)
npm run secrets:setup
# Start development environment with hot reload
npm run docker:dev
# Start production environment
npm run docker:prod
# Get interactive shell access to running container
npm run docker:shell
# Setup GitHub CLI and Copilot CLI authentication
npm run github:setup
# Rebuild Docker containers (after Dockerfile changes)
npm run docker:build
# Build TypeScript locally
npm run build
# Stop all containers
docker-compose down# Quick test - Core functionality (no secrets required)
npm run test:quick
# Full smoke test - Complete integration test with secrets
npm run test:smoke
# Smoke test (Linux/Mac)
npm run test:smoke:bashThis dockerized development environment provides:
- π Hot Reload: Automatic restart on file changes with
ts-node-dev - π Remote Debugging: Debug port exposed on
9229for VS Code - π€ GitHub Copilot CLI: Pre-installed with command suggestions and explanations
- οΏ½ VS Code Integration: Dev Containers support with extensions pre-configured
- οΏ½π¦ Multi-stage Builds: Separate optimized development and production containers
- π οΈ Development Tools: Git, GitHub CLI, vim, nano, htop, curl pre-installed
- π Full TypeScript Support: Configured with proper types and compilation
- π³ Docker Compose: Easy container orchestration for dev/prod environments
- π Volume Mounting: Live code editing without container rebuilds
- π API Ready: Sample HTTP server listening on port 3000
- Base: Node.js 20 LTS (slim)
- Tools: Git, GitHub CLI, vim, nano, htop, curl, procps
- AI: GitHub Copilot CLI with command suggestions
- TypeScript: Hot reload with
ts-node-dev - Debugging: Port 9229 exposed for remote debugging
- Volumes: Live code mounting with
node_modulesisolation, SSH keys, GitHub config - Environment:
NODE_ENV=development
- Base: Node.js 20 LTS (slim)
- Optimized: Multi-stage build with only production dependencies
- Compiled: Pre-built TypeScript to JavaScript
- Environment:
NODE_ENV=production
- Start development container:
npm run docker:dev - In VS Code, go to Run & Debug (Ctrl+Shift+D)
- Create launch configuration:
{ "type": "node", "request": "attach", "name": "Docker Debug", "port": 9229, "restart": true, "remoteRoot": "/usr/src/app" } - Set breakpoints and start debugging!
The container comes with GitHub Copilot CLI for AI-powered command assistance, with secure secret management.
- Setup secrets:
npm run secrets:setup(creates secure token files) - Start container:
npm run docker:dev - Run setup script:
npm run github:setup - Authenticate: Follow prompts to complete GitHub authentication
# Get shell access
npm run docker:shell
# Authenticate GitHub CLI
gh auth login
# Authenticate Copilot CLI
github-copilot-cli auth# Get command suggestions
github-copilot-cli suggest "find all typescript files"
# Explain a command
github-copilot-cli what-the-shell "find . -name '*.ts' -type f"
# Git assistance
github-copilot-cli git-assist "commit all changes with message"
# Short aliases (available after setup)
copilot suggest "deploy to production"
?? "what does this command do: docker ps -a"
git? "create a new branch"NODE_ENV:developmentorproductionPORT: Application port (default: 3000)DEBUG: Debug namespaces for enhanced logging
GitHub tokens are stored as Docker secrets for enhanced security:
# Setup secrets interactively (Windows)
npm run secrets:setup
# Setup secrets interactively (Linux/Mac)
npm run secrets:setup:bash
# Manual setup
echo "your_token_here" > secrets/github_token.txt
echo "your_token_here" > secrets/gh_token.txt
chmod 600 secrets/*.txtSecurity Benefits over .env files:
- β Tokens stored as files, not environment variables
- β Mounted as temporary filesystems (tmpfs)
- β
Never exposed in
docker inspector process lists - β Automatic cleanup when container stops
- β Restricted file permissions (600)
- β Not visible in container environment variables
- β Harder to accidentally leak in logs or dumps
Access inside container:
# Secrets are available at /run/secrets/
cat /run/secrets/github_token
cat /run/secrets/gh_tokenThe environment includes comprehensive automated tests to validate functionality:
- β Container builds successfully
- β API server starts and responds
- β TypeScript compilation works
- β Basic shell functionality
- β±οΈ Duration: ~2-3 minutes
- π No secrets required
- β All Quick Test validations
- β Docker secrets mounting and accessibility
- β GitHub token security validation
- β Container tools availability (git, curl, vim, etc.)
- β Node.js version verification
- β Development environment integration
- β±οΈ Duration: ~3-4 minutes
- π Creates test secrets automatically
Both tests include automatic cleanup and detailed pass/fail reporting.
- 3000: Application HTTP server
- 9229: Node.js debug/inspector port
dogetech-dev-env/
βββ .devcontainer/
β βββ devcontainer.json # VS Code Dev Container configuration
βββ scripts/
β βββ github-setup.sh # GitHub CLI and Copilot setup script
β βββ setup-secrets.sh # Docker secrets setup (Linux/Mac)
β βββ setup-secrets.ps1 # Docker secrets setup (Windows)
β βββ smoke-test.sh # Comprehensive integration test (Linux/Mac)
β βββ smoke-test.ps1 # Comprehensive integration test (Windows)
β βββ quick-test.ps1 # Quick functionality test
βββ secrets/ # Docker secrets directory
β βββ README.md # Secrets documentation
β βββ github_token.txt.example # Token template
β βββ gh_token.txt.example # GitHub CLI token template
βββ src/
β βββ index.ts # Sample TypeScript application
βββ dist/ # Compiled JavaScript output
βββ node_modules/ # Dependencies (gitignored)
βββ .env.example # Environment variables template
βββ .gitignore # Comprehensive ignore rules
βββ docker-compose.yml # Container orchestration with secrets
βββ dockerfile # Multi-stage container definition
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ docker-compose.override.example.yml # Local development overrides
βββ README.md # This file
- Clone or download this repository
- Install dependencies:
npm install - Start development:
npm run docker:dev - Access your app: Visit
http://localhost:3000 - Start coding: Edit files in
src/and watch them reload automatically!
Perfect for:
- β Team Development: Consistent environment across all developers
- β CI/CD Pipelines: Reproducible builds and deployments
- β Learning Docker: Complete example with best practices
- β Microservices: Template for containerized Node.js services
- β Remote Development: Works great with VS Code Remote-Containers
Built with β€οΈ for developers who want a hassle-free Docker development experience.