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

Pass the image to `ImagePullPolicy.shouldPull`

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, node.js, typescript
領域
backend, devtools

調査の方向性

Start with packages/testcontainers/src/utils/pull-policy.ts, then trace policy use in generic-container.ts, generic-container-builder.ts and docker-compose-environment.ts. Check #1518 for the existing return values before deciding how to handle the compatibility and multiple-image cases. Done means policies receive the relevant image, named outcomes are accepted alongside current values, and the documented call sites handle them consistently.

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

説明

enhancement minor

What happens

ImagePullPolicy.shouldPull() takes no arguments:

export interface ImagePullPolicy {
  shouldPull(): boolean | "never";
}

A custom policy cannot see which image it is being asked about, so it cannot express rules such as "always pull :latest, use the cache for pinned tags" or "never pull images from the local registry". One policy instance is applied to every image a container, a Dockerfile build or a Compose environment needs.

The return type mixes two booleans with a string: false means "pull if missing", true means "always pull" and "never" means "fail if missing".

Expected

  • shouldPull receives the image, for example shouldPull(image: ImageName).
  • The three outcomes have names, for example "always" | "missing" | "never", accepted alongside the current values.

Where

  • packages/testcontainers/src/utils/pull-policy.ts
  • call sites in generic-container.ts, generic-container-builder.ts and docker-compose-environment.ts

Notes

  • Java's interface is boolean shouldPull(DockerImageName imageName). .NET's policy is a Func<ImageInspectResponse, bool>.
  • Passing an argument is compatible with existing policies, hence minor. Dropping the boolean | "never" return values would be major.
  • Compose and Dockerfile builds resolve several images. Decide what they pass.

Dependencies

  • Nothing blocks this. It can start now.
  • Coordinate with #1518: for the old return values.
主要言語
TypeScript
スター
2.6k
フォーク
277
平均マージ
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 を短くまとめたダイジェスト。