services: sample: image: alpine command: sh -c 'sleep 30' volumes: - data:/shared pre_start: - image: alpine command: sh -c 'echo ran-0 >> /shared/hooks.txt' - image: alpine command: sh -c 'exit 17' volumes: data: