testcontainers / testcontainers/testcontainers-hs

Ryuk is inaccessible when tests are run inside a network

Open
#42 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
78
Forks
24
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Reproduce the GitHub Actions scenario with testcontainers-hs running inside a non-default Docker network, then trace the Ryuk connection and network inspection path; done means Ryuk is reachable through the mapped host port and the scenario no longer raises InspectOutputMissingNetwork.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github-actions, haskell
Domain
devops, infrastructure, networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.