docker / docker/compose

[BUG] Unexpected output on already turned off service when running compose down

Open
#14,219 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/0-triage
Dominant language
Go
Stars
38.2k
Forks
5.8k
Avg merge
2d 14h
Merged PRs (30d)
55

Description

Description

Currently when running composer down multiple times I'm getting messages that something was cleaned which didn't happen in the past and is confusing.

Steps To Reproduce
  1. Run docker compose up --build --pull always
  2. Run docker compose down --rmi local --remove-orphans
  3. Run above command again.
  4. Watch CLI for messages like:
    $ docker compose down --rmi local --remove-orphans
    [+] down 1/1
     ✔ Dangling images Removed
    
  5. Each time you repeat the above command you get same output about removed dangling images, even though there's nothing to remove anymore.
Compose Version
Docker Compose version 5.5.1
Docker Environment
Client:
 Version:    29.8.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  0.37.1
    Path:     /usr/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  5.5.1
    Path:     /usr/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 33
 Server Version: 29.8.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1294c24a7da8e5a793ed378161673abe94118892.m
 runc version:
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 7.2.4-arch1-2
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 62.71GiB
 Name: <snip>
 ID: GBA2:RCC2:I3KF:DCOL:KPFB:VESF:4CS7:AZJP:A6ZR:WOHV:GZ5X:4NS5
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false
 Firewall Backend: iptables
  EnableUserlandProxy: true
  UserlandProxyPath: /usr/bin/docker-proxy
Anything else?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the repeated docker compose down --rmi local --remove-orphans commands described in the issue, then trace the Compose CLI handling for image removal and its progress output. Done means the command reports dangling images as removed only when something was actually removed, while repeated runs remain quiet or accurately indicate no removal.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.