Skip to content

docker compose up --scale: when scale reduces, no actions are printed #11391

@felixfontein

Description

@felixfontein

Description

When running docker compose up --scale service=count where count is lower than the current count, no actions are shown about stopping/removing the superfluous containers.

Steps To Reproduce

compose.yaml:

version: '3'
services:
  foobar:
    image: alpine:latest
    command: -c 'sleep 10m'
  1. Run docker compose up --scale foobar=2 --detach
  2. Run docker compose up --scale foobar=1 --detach

The second command only prints that compose-foobar-2 is Running, but not mention that compose-foobar-1 was stopped/removed.

This is the case both with and without --dry-run.

Compose Version

Docker Compose version 2.24.1

Docker Environment

Client:
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  0.12.1
    Path:     /usr/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  2.24.1
    Path:     /usr/lib/docker/cli-plugins/docker-compose

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