docker / docker/compose

container re-created when it shouldn't, if using `docker-compose run`

Open
#13,769 4 comments 0 reactions 1 assignee View on GitHub

@ndeloof is already working on this.

Since Aug 28, 2026.

Dominant language
Go
Stars
38.2k
Forks
5.8k
Avg merge
2d 14h
Merged PRs (30d)
55

Description

I confirm strange recreation when I do docker-compose run --rm my_service_with_oneoff_tools. The service defines depends_on the db service and the db doesn't have the expected users after recreation.

The issue is not reproduced with older version of docker-compose (docker-compose version 1.29.2, build 5becea4c)

Originally posted by @DXist in #9897

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.