compose: only the last volume's create_host_path directories are created

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

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

@ogulcanaydogan がすでに取り組んでいます。

2026年11月1日 から。

  • #5318 @ogulcanaydogan による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go
領域
cli

調査の方向性

The bug is in the volumes loop of Parse in pkg/composer/serviceparser/serviceparser.go, where c.Mkdir = mkdir overwrites the directory list on each iteration. Read that loop and how c.Mkdir is consumed, then check the existing test setup for create_host_path. Done means several bind volumes accumulate their host directories and a test with multiple volumes fails before the change. Pull request #5318 already addresses this, so review or test it rather than starting a new fix.

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

説明

In Parse (pkg/composer/serviceparser/serviceparser.go) the volumes loop does c.Mkdir = mkdir for every volume. mkdir holds the host directories that one bind volume with create_host_path needs, so each volume replaces what the earlier ones collected.

With two bind volumes that point at missing host paths, only the second path is created by compose up. If a later volume needs no directory (for example its source already exists), the list is reset to empty and none are created.

Appending instead of assigning fixes it. I have a patch with a test that fails before the change.

主要言語
Go
スター
10.5k
フォーク
839
平均マージ
3日 18時間
マージ済み PR(30日)
40

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

containerd/nerdctl のほかの issue

containerd/nerdctl の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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