Skip to content

Missing devops-dojo-net Docker network causes container creation failures #8

@alanops

Description

@alanops

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:

  1. Create the network on server startup if it doesn't exist
  2. Remove the network requirement and use default bridge
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions