Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ryuk is inaccessible when tests are run inside a network #42

Open
michivi opened this issue Jun 22, 2023 · 0 comments
Open

Ryuk is inaccessible when tests are run inside a network #42

michivi opened this issue Jun 22, 2023 · 0 comments

Comments

@michivi
Copy link
Contributor

michivi commented Jun 22, 2023

The Ryuk container is inaccessible by testcontainers-hs when it is run inside a Docker container, itself running in a network different from the default one.

The tested scenario is:

  • The testing code is run inside a container, in a dedicated network
  • The testing code spawns a testcontainer with a dedicated network (different from the previous one, but the issue also occurs within the same network). As a result, a Ryuk container is spawned for it. But it is so in the default Docker network.
  • When attempting to contact Ryuk, testcontainers cannot find the dedicated alias, and fails.

This scenario can be encountered when running tests on GitHub Actions within a container.

In such a scenario, the following message is printed:

       uncaught exception: DockerException
       InspectOutputMissingNetwork {id = "cb9daeaca3[...]37bd2490"}

Whenever testcontainers-hs is run inside a container in a network different from the default one, then Ryuk cannot be accessed directly. It needs to access Ryuk using the mapped port on the host.

  • Tested version: 0.5.0.0
  • Environment: GitHub Actions, code running inside a Docker container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant