mirror of
https://github.com/docker/compose.git
synced 2026-11-18 22:27:03 +00:00
18 lines
497 B
YAML
18 lines
497 B
YAML
services:
|
|
task:
|
|
image: alpine
|
|
command: echo "task done"
|
|
depends_on:
|
|
- dep
|
|
dep:
|
|
image: alpine
|
|
init: true
|
|
command: sleep infinity
|
|
volumes:
|
|
# anonymous volume: no source, so it lives and dies with the container
|
|
# unless carried over on recreate
|
|
- /data
|
|
environment:
|
|
# divergence vector: changing TAG between invocations changes the
|
|
# config-hash of dep, which the default policy answers by recreating
|
|
TAG: ${TAG:-initial}
|