isolated-sandbox / build_devenv.ps1
ChefAdorous's picture
Final deployment: Complete Code Execution Sandbox with all features
fa11621
# Build script for development environment image
Write-Host "Building sandbox development environment image..." -ForegroundColor Cyan
Write-Host ""
# Check if Docker is running
try {
docker ps *> $null
if ($LASTEXITCODE -ne 0) {
Write-Host "Error: Docker is not running or not accessible" -ForegroundColor Red
exit 1
}
} catch {
Write-Host "Error: Docker is not running or not accessible" -ForegroundColor Red
exit 1
}
# Build the image
Write-Host "Building image from sandbox/images/devenv.Dockerfile..." -ForegroundColor Yellow
Write-Host "This may take 10-15 minutes on first build..." -ForegroundColor Yellow
Write-Host ""
docker build `
-f sandbox/images/devenv.Dockerfile `
-t sandbox-devenv:latest `
sandbox/images/
if ($LASTEXITCODE -eq 0) {
Write-Host ""
Write-Host "✅ Image built successfully!" -ForegroundColor Green
Write-Host ""
Write-Host "Verifying environment..." -ForegroundColor Cyan
# Run environment check
docker run --rm sandbox-devenv:latest /opt/environment_check.sh
Write-Host ""
Write-Host "Image info:" -ForegroundColor Cyan
docker images sandbox-devenv:latest
} else {
Write-Host ""
Write-Host "❌ Build failed!" -ForegroundColor Red
exit 1
}