Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add programmatic configuration

オープン
#1,569 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, node.js, typescript
領域
tooling

調査の方向性

Start with packages/testcontainers/src/test-containers.ts and packages/testcontainers/src/testcontainers-runtime/strategies/utils/config.ts, then trace the listed process.env reads in the reaper, port forwarder, image name, generic container and auth paths. Define how configuration is resolved alongside environment variables and the properties file, including precedence and changes after runtime initialization. Done means TestContainers.configure() and getConfiguration() provide typed effective settings while existing configuration sources continue to work.

索引モデルが issue の本文から書いたものです。

説明

enhancement minor

What happens

Configuration comes only from environment variables and .testcontainers.properties, and each setting is read where it is used. Fourteen variables are read through process.env across packages/testcontainers/src (Ryuk image, port, privileged, verbose and disabled flags, the SSHD image and port, the hub image prefix, reuse, Docker auth config and others), plus the Docker host settings in the strategy config.

  • Changing a setting from code means assigning to process.env before the first container starts.
  • Nothing is typed or validated. A misspelt variable is silently ignored.
  • There is no way to read the effective configuration.

Expected

A typed configuration object with one place that resolves it:

TestContainers.configure({
  ryuk: { disabled: false, privileged: true },
  hubImageNamePrefix: "registry.example.com/mirror",
  reuse: { enabled: true },
});
  • Environment variables and the properties file keep working, with a documented precedence.
  • TestContainers.getConfiguration() returns what is in effect.

Where

  • packages/testcontainers/src/container-runtime/strategies/utils/config.ts
  • the process.env reads in reaper/reaper.ts, port-forwarder/port-forwarder.ts, container-runtime/image-name.ts, generic-container/generic-container.ts and container-runtime/auth/
  • packages/testcontainers/src/test-containers.ts

Notes

  • Java centralises this in TestcontainersConfiguration.
  • Configuration must be set before the runtime client and Ryuk are created. Decide what happens when it is changed afterwards.

Dependencies

  • Nothing blocks this. It can start now.
  • Coordinate with #1568: the logger is a natural configuration setting.
主要言語
TypeScript
スター
2.6k
フォーク
274
平均マージ
1日 14時間
マージ済み PR(30日)
44

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

testcontainers/testcontainers-node のほかの issue

testcontainers/testcontainers-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。