Problem
The server attempts to connect scenario containers to a Docker network named 'devops-dojo-net' which may not exist.
Current Behavior
- Server runs:
docker run ... --network devops-dojo-net ...
- If the network doesn't exist, container creation fails with: "network devops-dojo-net not found"
- The network is only created when docker-compose is running
Expected Behavior
- The server should ensure the network exists before starting containers
- Or handle the error gracefully and create the network if needed
Root Cause
In src/server/index.ts:
const args = ['run', '-it', '--rm', '--name', containerName, '--network', 'devops-dojo-net', imageName];
The network is defined in docker-compose.yml but the server doesn't verify its existence.
Solution
Options:
- Create the network on server startup if it doesn't exist
- Remove the network requirement and use default bridge
- Add error handling to create network on-demand
Impact
- Scenarios fail to start if docker-compose hasn't been run
- Poor user experience with cryptic error messages