Skip to content

[BUG] docker compose ps ignores profiles #12361

Description

@mhalbritter

Description

I have 3 services:

  • service-1 has profile a.
  • service-2 has profile b.
  • service-3 has no profile.

I start all services using docker compose --profile a --profile b up.

Now running docker compose --profile a ps also returns service-2, even if it's in profile b. I'd expect that only service-1 and service-3 are returned.

It looks like that docker compose ps isn't profile aware.

Compose Version

Docker Compose version v2.26.0

Docker Environment

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.26.0
    Path:     /home/mhalbritter/.docker/cli-plugins/docker-compose

Server:
 Containers: 15
  Running: 3
  Paused: 0
  Stopped: 12
 Images: 101
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  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
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 88bf19b2105c8b17560993bee28a01ddc2f97182
 runc version: v1.2.2-0-g7cb3632
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.11.10-200.fc40.x86_64
 Operating System: Fedora Linux 40 (KDE Plasma)
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 62.43GiB
 Name: workstation
 ID: 39477fed-c319-4871-a149-961fcd877c6a
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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