Skip to content

V2: some container is stopped without ask for that when I run docker compose -f xxx.yml stop #9671

Closed
@PhilippeAccorsi

Description

@PhilippeAccorsi

Description

I have installed docker-compose-plugin and removing old docker-compose on a server.

In this server I have some container running from different yml file.

When I execute this command (same like before but without the -) docker compose -f docker-compose-0056_xxxxxx.yml stop, docker stop all running container.

When I start with thhis command docker compose -f docker-compose-0056_xxxxxx.yml up -d, just the service in this file are started.

Why other container are stopped ? (all other service use file like this docker-compose-<nome of application>.yml)

Steps to reproduce the issue:

  1. have some running container from different yml file
  2. try to just stop service from one file
  3. => all other service from other file is also stopped

Describe the results you received:

[+] Running 6/6
 ⠿ Container xxxxxx  Stopped                                                      12.6s
 ⠿ Container xxxxxx          Stopped                                                       1.7s
 ⠿ Container xxxxxx  Stopped                                                      12.2s
 ⠿ Container xxxxxx       Stopped                                                      11.7s
 ⠿ Container xxxxxx       Stopped                                                       1.1s
 ⠿ Container xxxxxx  Stopped                                                      12.5s

Describe the results you expected:

Juste stop service related to the file selected by docker compose -f (like we have with old command docker-compose -f)

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Docker Compose version v2.6.0

Output of docker info:

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.8.1-docker)
  compose: Docker Compose (Docker Inc., v2.6.0)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 7
  Running: 5
  Paused: 0
  Stopped: 2
 Images: 93
 Server Version: 20.10.14
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  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 logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8
 runc version: v1.0.3-0-gf46b6ba
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.0-11-amd64
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.6GiB
 Name: interne-03
 ID: BH56:QXXA:ZWMO:MA2O:OBHV:MVQN:VJGS:Z7IE:5P53:5BW2:OO7R:SJOH
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional environment details:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions