[BUG] `up` pulls an image once per service when several services share it
メンテナーはふだん 1 日以内に返信
評価
この issue はまだ評価されていません。
説明
Description
When several services use the same missing image, docker compose up sends one pull request
per service. docker compose pull pulls the image once (fixed for #8768).
With the containerd image store, every one of these pulls also unpacks the layers. On a stack of
21 services sharing one 5.7 GB image, up ran 21 parallel unpacks of the same layers on an
NVIDIA Jetson Thor. containerd logged about 17,600 (*service).Write failed ... ref moby/1/layer-sha256:... locked errors while the pulls waited on each other, and the progress
display stayed at 5.675 GB / 5.683 GB for several minutes while the load average was about 35.
Steps To Reproduce
compose.yaml:
services:
a:
image: alpine:3.20.3
command: ["sleep", "infinity"]
b:
image: alpine:3.20.3
command: ["sleep", "infinity"]
c:
image: alpine:3.20.3
command: ["sleep", "infinity"]
repro.sh (removes alpine:3.20.3 and counts the engine's pull events):
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
count_pulls() {
docker compose down --timeout 0 >/dev/null 2>&1
docker image rm --force alpine:3.20.3 >/dev/null 2>&1 || true
docker events --filter type=image --filter event=pull --format '{{.Action}} {{.Actor.ID}}' > events.log &
local events_pid=$!
sleep 1
docker compose "$@" >/dev/null 2>&1
sleep 2
kill "$events_pid"
echo "docker compose $*: $(wc -l < events.log) pull(s)"
}
count_pulls pull
count_pulls up --detach
docker compose down --timeout 0 >/dev/null 2>&1
rm -f events.log
Output:
docker compose pull: 1 pull(s)
docker compose up --detach: 3 pull(s)
Expected: up --detach pulls the image once, like pull.
Compose Version
Docker Compose version v5.6.1
Docker Environment
Client and server 29.9.2, Fedora Linux 45 (Workstation Edition), x86_64,
storage driver overlayfs with io.containerd.snapshotter.v1
Anything else?
No response
- 主要言語
- Go
- スター
- 38.9k
- フォーク
- 6k
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 81
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/compose のほかの issue
-
[BUG] `docker compose port` prints `:0` (exit 0) for a port the image exposes but the service does not publish対応中かも @ndeloof が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
docker/compose#14435 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] deploy.restart_policy without condition drops the restart policy再び着手できるかも @akshat-lakhera が 25 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
docker/compose#14383 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] up: an optional (required: false) service_healthy dependent is not started when a required dependent shares the failing wait対応中かも @ndeloof が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
docker/compose#14507 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Negative replica count in scale flags (docker compose scale / --scale) is accepted without validation対応中かも @arsalanyavari が 8 日前に担当しました。 オープンkind/bug status/approved
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
fluxcd/notification-controller#1441 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
volcengine/volcengine-go-sdk#163 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
OneBusAway/maglev#2145 ·
メンテナーはふだん 2 日以内に返信
-
priority/medium status/ready type/chore
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
discobox-ai/discobox#1357 ·
メンテナーはふだん 1 日以内に返信