testcontainers / testcontainers/testcontainers-python

Question: Can I cache a docker image

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

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

📖 documentation
主要言語
Python
スター
2.3k
フォーク
386
平均マージ
4時間 40分
マージ済み PR(30日)
1

説明

What are you trying to do?

I have a docker image which is based on postgres, but contains
additional some (large) *.sql files in /docker-entrypoint-initdb.d/ .

When the docker container is started, it will import the sql files.
This will delay the startup time until I can access the docker image for testing.

I assume that when I use testcontainers it is similiar to the call

docker run --rm

in the sense, that after the container was used, it is thrown away.

Is it possible to tell testcontainers to cache the container, so the next time I use that image the
database is already initialized?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

まず、Testcontainers のコンテナライフサイクルと、docker run --rm によって示される Docker の動作、特に /docker-entrypoint-initdb.d/ からの PostgreSQL の初期化について確認します。再利用またはキャッシュがサポートされているかを判断し、サポートされている動作、または初期化済みコンテナをキャッシュ可能にするために必要な範囲を文書化します。

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

評価

技術スタック
docker, postgres, python
領域
databases, testing
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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