Skip to content

[BUG] Weird behavior between orphaned containers and --remove-orphans flag #12015

Description

@MatTheCat

Description

After using run on an updated Compose, I’ve been greeted by a

WARN[0000] Found orphan containers […] for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.

The thing is, I didn’t remove or rename the corresponding service, so I don’t know how to reproduce.

Adding the --remove-orphans flag on run didn’t change anything, but it did work with up.

Steps To Reproduce

No response

Compose Version

$ docker compose versionDocker Compose version v2.29.0

Docker Environment

$ docker infodocker infoClient: Docker Engine - Community Version: 27.1.0 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.16.1 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.29.0 Path: /usr/libexec/docker/cli-plugins/docker-composeServer: Containers: 11 Running: 4 Paused: 0 Stopped: 7 Images: 30 Server Version: 27.1.0 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 runc Default Runtime: runc Init Binary: docker-init containerd version: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41 runc version: v1.1.13-0-g58aa920 init version: de40ad0 Security Options: apparmor seccomp Profile: builtin Kernel Version: 6.5.0-44-generic Operating System: Ubuntu 22.04.4 LTS OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 30.74GiB Name: P-ASN-TINY ID: 35d93767-e18b-4cc4-8eeb-d7fd382366f2 Docker Root Dir: /home/docker Debug Mode: false Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions