[Enhancement]: Add .NET MiniStack module

Open
#1,804 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #1806 by @kharabasz — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
24/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp, docker

Research direction

Read the existing module layouts and the Java MiniStack module linked in the issue, then review the proposed builder, container, configuration, connection string provider, and cleanup behavior. The issue author says they already have a working implementation with real-container tests and are waiting for approval to open a PR; a newcomer should check with the author before starting. Done means a .NET MiniStack module with the listed options, version methods, health check, and instance-scoped cleanup.

Written by the indexing model from the issue text.

Description

enhancement module
Problem

MiniStack is a free, MIT-licensed AWS emulator that serves its AWS services on port 4566. It has a Java Testcontainers module (ministackorg/testcontainers-ministack), but there is no MiniStack module in this repo.

Solution

A Testcontainers.MiniStack module that follows the layout of the existing modules (MiniStackBuilder, MiniStackContainer, MiniStackConfiguration, a connection string provider):

  • new MiniStackBuilder("ministackorg/ministack:1.5.31"), port 4566, and a wait for HTTP 200 on /_ministack/health.
  • GetConnectionString(), plus GetRegion(), GetAccessKey() and GetSecretKey(), which return the configured values or MiniStack's defaults.
  • Builder options that match the Java module: WithRegion, WithCredentials, WithPersistence, WithImdsV2Required, and WithRealInfrastructure. The last one bind-mounts the Docker socket so MiniStack can run real RDS, ElastiCache, ECS and Lambda containers.
  • GetMiniStackVersion() returns the image tag. GetMiniStackVersionAsync() returns the version the server reports.
  • TestcontainersSettings.HubImageNamePrefix is passed through as MINISTACK_IMAGE_PREFIX, so nested images come from the same mirror.
  • On stop or dispose, the module removes the sibling containers that this MiniStack spawned in real-infrastructure mode. Ryuk doesn't know about them. Cleanup is scoped to the instance's ministack.instance label, so other MiniStack instances on the same daemon are left alone.
Benefit

.NET users get a MiniStack container that is ready to use, with no auth token, and feature parity with the Java module.

Alternatives

Build the container with ContainerBuilder, which leaves the port, wait strategy and environment variables to each user. I offered the module to the MiniStack maintainers first, but they aren't publishing a NuGet package for now (ministackorg/testcontainers-ministack#18), so this module would live here.

Would you like to help contributing this enhancement?

Yes. I have a working implementation with tests against real containers, and can open the PR once you're OK with adding the module.

Dominant language
C#
Stars
4.4k
Forks
366
Avg merge
2d 6h
Merged PRs (30d)
19

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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/testcontainers-dotnet

All issues in testcontainers/testcontainers-dotnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.