Skip to content

Feature Request: Allow Network Mode Selection in Container Structure Test #493

@Donatien26

Description

@Donatien26

Description

With recent Docker installations, the default network mode is bridge, which prevents requests to networks not connected to the bridge. When using container-structure-test to send curl requests to different services, this limitation can cause issues.

Would it be possible to add an option to specify the desired network mode when running container-structure-test? This would allow users to configure a network mode that suits their testing environment, such as host or a custom network.

Expected Behavior

  • A new flag or configuration option to specify the network mode (--network similar to docker run).
  • Users can set host, bridge, or any custom network as needed.

Actual Behavior

  • Currently, the default bridge mode restricts network access, preventing some requests from working as expected.
  • No built-in option to override the network mode.

Use Case

  • This feature would benefit users testing containers that need access to external services, databases, or APIs that are not within the default bridge network.

Would this be a feasible addition to the tool? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions