[BUG] `up` pulls an image once per service when several services share it
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 38.9k
- Fork
- 6k
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 81
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/compose
-
[BUG] `docker compose port` prints `:0` (exit 0) for a port the image exposes but the service does not publishCó thể đã có người làm @ndeloof đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
docker/compose#14435 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] deploy.restart_policy without condition drops the restart policyCó thể làm lại được @akshat-lakhera đã nhận 25 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
docker/compose#14383 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] up: an optional (required: false) service_healthy dependent is not started when a required dependent shares the failing waitCó thể đã có người làm @ndeloof đã nhận 2 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
docker/compose#14507 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Negative replica count in scale flags (docker compose scale / --scale) is accepted without validationCó thể đã có người làm @arsalanyavari đã nhận 8 ngày trước. Đang mởkind/bug status/approved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của docker/compose
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
fluxcd/notification-controller#1441 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OneBusAway/maglev#2145 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
priority/medium status/ready type/chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
discobox-ai/discobox#1357 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for itCó thể đã có người làm @fzn0x đã nhận hôm nay. Đang mởbug priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
edit_file diff rendering panics on invalid UTF-8 textCó thể đã có người làm @TDnorthgarden đã nhận hôm nay. Đang mởarea/tui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
docker/docker-agent#4955 ·
Maintainer thường phản hồi trong vòng 1 ngày