-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Problem
The server attempts to create containers from Docker images without checking if those images exist, leading to confusing errors.
Current Behavior
- Server maps scenario IDs to image names
- Directly attempts
docker runwithout validation - If image doesn't exist: "Unable to find image 'devopslearn/scenario-keycloak-crashloop:latest' locally"
Expected Behavior
- Server should check if required images are built
- Provide clear error messages if images are missing
- Guide users to run
make scenario-build
Root Cause
In src/server/index.ts, the startScenarioContainer function:
const imageMap: Record<string, string> = {
'k8s-crashloop': 'devopslearn/scenario-keycloak-crashloop',
// ...
};
// No validation before:
const child = spawn('docker', args);Solution
- Add image existence check before container creation
- Return meaningful error to client if image missing
- Include instructions for building images
Impact
- Poor user experience when images aren't built
- Cryptic Docker errors instead of actionable messages
- Users don't know they need to run
make scenario-build
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request