Attempting to remove a not created container throws a no such service error (2.3.x regression) (original) (raw)

Description

Attempting to docker compose rm a not created container fails and throws a no such service: foo-service error.
This worked fine in previous 2.x versions before 2.3.x.

Steps to reproduce the issue:

  1. Remove a container with docker rm -fsv some-container
  2. Attempt to remove the same container again

Describe the results you received:
no such service: foo-service and non 0 exit status

Describe the results you expected:
0 exit status

Additional information you deem important (e.g. issue happens only occasionally):
Relates to #9241

Output of docker compose version:

Docker Compose version v2.3.3