Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .env
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 77/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker-compose, python
- 領域
- devops, infrastructure
調査の方向性
まず docker-compose.yml と .dockerignore を確認し、scheduler と worker の待機先、実行時の env_file 設定、issue に記載された古い Compose バージョンキーを調べます。Docker Compose のセットアップを実行し、worker が vulnerablecode:8000 を待機することと、コンテナが必要な実行時環境変数を受け取ることを確認します。/etc/vulnerablecode/.env を使用するセットアップも含め、起動失敗と非推奨警告が解消されたら完了です。
索引モデルが issue の本文から書いたものです。
説明
While setting up VulnerableCode locally with Docker Compose, I hit a few issues in docker-compose.yml and .dockerignore:
-
Scheduler and RQ workers wait on
web:8000instead ofvulnerablecode:8000
vulnerablecode_scheduler,vulnerablecode_rqworker, andvulnerablecode_rqworker_highrunwait-for-it web:8000, which does not match any service name indocker-compose.yml(nginxproxies tovulnerablecode:8000). On startup, all three time out:vulnerablecode_rqworker-1 | wait-for-it: timeout occurred after waiting 15 seconds for web:8000 vulnerablecode_rqworker_high-1 | wait-for-it: timeout occurred after waiting 15 seconds for web:8000 vulnerablecode_scheduler-1 | wait-for-it: timeout occurred after waiting 15 seconds for web:8000Updating this to
wait-for-it -t 60 vulnerablecode:8000waits on the actual service and allows initial migrations to finish before workers start. -
.envis not loaded viaenv_fileat container runtime (and is missing from.dockerignore)
docker-compose.ymlcurrently only specifiesdocker.envunderenv_file. If images are built beforemake envfileis run, all application and worker containers exit immediately on startup:django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variableAdding
.envto.dockerignore(alongsidedocker.env) keeps build layers clean, and loading.envwithrequired: falseindocker-compose.ymlpassesSECRET_KEYandALTCHA_HMAC_KEYat runtime without breaking setups that use/etc/vulnerablecode/.env. -
Obsolete top-level
version: "3"key
Docker Compose v2 logs a deprecation warning on every command untilversion: "3"is removed.
I have tested these fixes locally and will open a PR with a regression test shortly.
- 主要言語
- Python
- スター
- 716
- フォーク
- 347
- 平均マージ
- 13時間 47分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aboutcode-org/vulnerablecode のほかの issue
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargo対応中かも @Ashutosh-Panda2004 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aboutcode-org/vulnerablecode#2485 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"対応中かも @Ashutosh-Panda2004 が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aboutcode-org/vulnerablecode#2474 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Docker build fails on Apple Silicon (arm64) — only x86_64 wheels pinned for extractcode-7z, extractcode-libarchive, typecode-libmagic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
aboutcode-org/vulnerablecode#2426 ·
メンテナーはふだん 1 日以内に返信
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/再び着手できるかも @Anshi321 が 27 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug data-quality
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aboutcode-org/vulnerablecode#2418 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
We do not collect the affected range for Gitlab advisories対応中かも @akashrajeev が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
aboutcode-org/vulnerablecode#2412 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
aboutcode-org/vulnerablecode の issue をすべて見る
似ている issue
-
PluginProvider.storeInstance races and clobbers the dedup cache for concurrent loads対応中かも @Wilson0511 が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信
-
community documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
kagent-dev/kagent#3462 ·
メンテナーはふだん 1 日以内に返信