Start a group of containers with dependencies and shared cleanup
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Read the existing GenericContainer and Network implementations under packages/testcontainers/src, then inspect how container startup and cleanup are handled. Design the group API from the issue’s sketch, including dependency ordering, parallel starts, shared network aliases, and stopping containers if a start fails; done means the group can start and dispose of a set of containers as described.
索引モデルが issue の本文から書いたものです。
説明
What happens
A test that needs several containers wires them up by hand:
const network = await new Network().start();
const db = await new PostgreSqlContainer(dbImage).withNetwork(network).withNetworkAliases("db").start();
const app = await new GenericContainer(appImage)
.withNetwork(network)
.withEnvironment({ DATABASE_URL: "postgres://test:test@db:5432/test" })
.withExposedPorts(8080)
.start();
// ...
await app.stop();
await db.stop();
await network.stop();
- Start order is whatever order the
awaits are written in. Independent containers start one after another unless the test adds its ownPromise.all. - With
Promise.all, if onestart()rejects the others keep running until Ryuk removes them at process exit. - Cleanup is one call per container, in the right order.
Expected
A way to declare a set of containers, their dependencies and a shared network, start them as a unit and dispose of them as a unit:
await using group = await new ContainerGroup()
.with("db", new PostgreSqlContainer(dbImage))
.with("app", new GenericContainer(appImage).withExposedPorts(8080), { dependsOn: ["db"] })
.start();
const app = group.get("app");
- Containers without a dependency between them start in parallel.
- Each name becomes a network alias on a network the group owns.
- If any container fails to start, the ones already started are stopped.
Where
New code in packages/testcontainers/src, built on GenericContainer and Network.
Notes
- Java has
dependsOn(Startable...)on containers andStartables.deepStart(...)for parallel start. DockerComposeEnvironmentcovers this when the setup lives in a compose file. This is for setups defined in code, including module containers.- The API shape above is a sketch.
Dependencies
- Nothing blocks this. It can start now.
- Coordinate with #1536: a group puts its containers on a network with aliases.
- Coordinate with #1520: a group starts builders it was handed, so
start()must not change them.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 274
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 44
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
testcontainers/testcontainers-node#1529 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 1 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
A hung CI job runs for 6 hours before it is cancelled対応中かも @Olanetsoft が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Olanetsoft/agent-lookout#110 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
thedotmack/claude-mem#4757 ·
メンテナーはふだん 1 日以内に返信
-
🐛 bug 🗺️ MCP OAuth
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
LibreChat-AI/LibreChat#17077 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100