testcontainers / testcontainers/testcontainers-java
InternalCommandPortListeningCheck always fails for containers built without `/bin/sh`
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 8.7k
- フォーク
- 1.9k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 9
説明
Relates to #2984
I'm surprised we've not come across this earlier, but the default TCP port listening detector InternalCommandPortListeningCheck does not work for containers that do not have /bin/sh included.
This predominantly affects images built upon scratch.
The workaround/solution is to use a more application specific WaitStrategy - e.g. an HTTP wait strategy.
However the log messages don't make this easy to realise.
Given that we do both the internal and external port checks for a good reason, I don't think we can just rely on the external port check. Still perhaps we can raise a very specific error message if /bin/sh is not available inside the container.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
InternalCommandPortListeningCheck から始め、コンテナに /bin/sh がない場合に使用されるログとエラーの経路をたどります。scratch からビルドしたイメージで動作を再現し、その後、失敗時に不足しているシェルと影響を受ける待機戦略が明確に示されるようにします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- docker, java
- 領域
- testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100