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

Add pluggable image name substitution

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

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

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

評価

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

調査の方向性

Start with packages/testcontainers/src/container-runtime/image-name.ts and trace how ImageName is built for Ryuk and SSHD. The issue leaves the scope of Compose images and Dockerfile FROM lines undecided, and depends on configuration work in #1569. Done means image pulls pass through the configured substitutor, with the existing prefix variable as the default.

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

説明

enhancement minor

What happens

The only way to redirect image pulls is TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX, which prefixes Docker Hub image names. It cannot:

  • map other registries (ghcr.io, quay.io, mcr.microsoft.com) to a mirror
  • apply different rules to different images
  • rewrite a tag or a digest

Organisations that mirror everything through an internal registry end up editing image names in every test.

Expected

A function that every image name passes through before it is pulled, registered in configuration:

TestContainers.configure({
  imageNameSubstitutor: (image) => (image.registry === "ghcr.io" ? image.withRegistry("mirror.example.com/ghcr") : image),
});

The existing prefix variable becomes the default substitutor.

Where

  • packages/testcontainers/src/container-runtime/image-name.ts
  • the places that build ImageName for Ryuk and SSHD

Notes

  • Java has a pluggable ImageNameSubstitutor, with PrefixingImageNameSubstitutor as the built-in equivalent of the prefix variable. Go has WithImageSubstitutors.
  • Decide whether images named in Compose files and Dockerfile FROM lines are in scope.

Dependencies

  • Blocked by #1569: the substitutor is registered through configuration.
主要言語
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 を短くまとめたダイジェスト。