Add a possibility to start Ryuk in a Network

Open
#54 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, go

Research direction

The issue does not name a source file or test. Start by tracing how moby-ryuk is started and how its Docker network is selected, then reproduce the GitHub Actions self-hosted runner setup with a user-created network. Done means Ryuk can join the requested network and still receive containers for cleanup.

Written by the indexing model from the issue text.

Description

Hi is it possible to start the container in a docker network?

The current problem is that, when I use Github Action and start a container it forces me into a docker network generated by Github Action and the self hosted runner in my company doesn't allow inter network communication. But Testcontainers (at least the Java lib) starts Ryuk in the default network and so it can't be reached anymore. Even when I start the docker image manually to build and test without a network it can't reach some other containers. Only when I start a new network and run the containers in it they can communicate.

Old GHA looked like that:

name: "Release Java Artifact"
on:
  workflow_dispatch:
jobs:
  build-push:
    name: Build and Push to Artifactory
    runs-on: self-hosted
    container:
      image: docker:dind # For example in our case a specialized image that contains everything to build
    steps:
      - name: Maven deploy
        run: |
          mvn -B install deploy:deploy --no-transfer-progress

My current solution is to start a network manually run the building container in it and give the network name as env variable to the container I start within the tests. But for Ryuk its currently not possible? Do you have a Idea how to solve that? I want to add the container to the deathnote 🗡️

Dominant language
Go
Stars
244
Forks
41
PR merge metrics
No merged PRs in 30d

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.

More from testcontainers/moby-ryuk

All issues in testcontainers/moby-ryuk

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.