container re-created when it shouldn't, if using `docker-compose run`
Author: amotlCreated May 2, 2026Updated Aug 28, 2026
I confirm strange recreation when I do
docker-compose run --rm my_service_with_oneoff_tools. The service definesdepends_onthe 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
Source: docker/compose