Expose host ports per container instead of globally
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 54/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Read start and startContainer in packages/testcontainers/src/generic-container/generic-container.ts, then trace host access through packages/testcontainers/src/port-forwarder/port-forwarder.ts and packages/testcontainers/src/test-containers.ts. Check how the request affects reuse hashing and coordinate with #1520 and #1522. Done means a container can opt in with withExposedHostPorts(...ports), unrequested containers stay unaffected, and the existing global call continues to work.
索引モデルが issue の本文から書いたものです。
説明
What happens
TestContainers.exposeHostPorts(...ports) is global and permanent. Once it has been called, every container started afterwards in the process:
- is connected to the port forwarder's network, in addition to its own
- gets a
host.testcontainers.internalentry in its extra hosts
whether or not it needs to reach the host. A container cannot opt out, and exposure cannot be scoped to one test. The extra network shows up in getNetworkNames().
Expected
Host access is requested per container, for example withExposedHostPorts(...ports). Containers that did not ask are left alone. The global call keeps working.
Where
startandstartContainerinpackages/testcontainers/src/generic-container/generic-container.tspackages/testcontainers/src/port-forwarder/port-forwarder.tspackages/testcontainers/src/test-containers.ts
Notes
- Java keeps the global
Testcontainers.exposeHostPorts(...)and makes containers opt in withwithAccessToHost(true). Go'sWithHostPortAccess(ports...)is per container. - Related: #1188.
- Changing the global call so that containers no longer get host access by default would be
major. Adding the per-container form isminor.
Dependencies
- Stack on #1520: the host-access wiring is in
start(), where it is one of the things that accumulates. - Coordinate with #1522: host access changes the create request, so it affects the reuse hash.
- 主要言語
- 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
-
Create/import wallet form shows raw "password must be at least 1 characters" instead of the translated message対応中かも @CapThunder19 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
joinmarket-webui/jam#1538 ·
メンテナーはふだん 1 日以内に返信
-
t0ggles
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nolimits4web/swiper#8240 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/inspector#2723 ·
メンテナーはふだん 1 日以内に返信
-
status:approved type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信