mirror of
https://github.com/docker/compose.git
synced 2026-11-17 21:57:19 +00:00
The dependencies a one-off starts go through the regular create path and its config-hash divergence check, with no way to opt out: any resolution difference with the command that created them (environment, model edit) recreates the dependency — destroying state a previous run built up (issue #13769's database losing its users). up already offers --no-recreate for exactly this; run now aligns: the flag maps to the "never" recreate policy, propagated through the RunOptions.CreateOptions fields that startDependencies previously dropped. Default behavior is unchanged (empty policy = "diverged"). Closes #13769 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
14 lines
353 B
YAML
14 lines
353 B
YAML
services:
|
|
task:
|
|
image: alpine
|
|
command: echo "task done"
|
|
depends_on:
|
|
- dep
|
|
dep:
|
|
image: alpine
|
|
init: true
|
|
command: sleep infinity
|
|
environment:
|
|
# divergence vector: changing TAG between invocations changes the
|
|
# config-hash of dep, which the default policy answers by recreating
|
|
TAG: ${TAG:-initial}
|